Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Background DMI call causes ListGrid cell to highlight text if cell is being edited.

    Java: 1.8
    SGWT: 5.0-p20180227
    Occurs in Chrome, Firefox, IE

    Hi Isomorphic,

    We are experiencing an issue that is driving us batty.

    Essentially, a client background DMI call that occurs in the middle of an edit in a ListGrid is causing that edited text to become highlighted. I
    f the user does not notice this and keeps typing, the highlighted text is over-written by the next keystroke.

    Situation:

    1) We have a Timer that makes a DMI call to the Application Server every minute.
    2) The DMI call has an RPCCallback to handle the return of data.
    3) The call is used to extend or cancel the user's session and has nothing to do with the text or data in the ListGrid.


    4) We have a ListGrid that has a ListGridEditorCustomizer set on it.
    5) The ListGrid has 2 columns: one for an non-editable 'Key' the other for an editable 'Value'.
    6) The ListGridEditorCustomizer returns either a TextItem or a ComboxItem for the 'Value' column of each row.
    See the method ListGridEditorCustomizer.getEditor(ListGridEditorContext context)
    7) This Grid does not have a Datasource set on it.



    Scenario:
    A user is editing the 'Value' column and the ListGrid cell is a TextItem.
    DMI call occurs while the user is typing data into the TextItem.
    The text gets highlighted.
    User does not notice the text (mysteriously) gets highlighted.
    Their next keystroke removes their previous typing...user Mad!!!


    We would like to know, how to prevent ListGrid from highlighting the text being edited when the DMI call occurs.


    Please note, this problem only occurs if the user is editing the TextItem on a cell of a ListGrid.
    It does not occur if the user is editing a TextItem on a Form.

    Many Thanks,
    siegersallee
    Last edited by siegersallee; 9 Jun 2018, 05:35.

    #2
    The default for server calls is to block interaction during the call, due to the default setting for rpcRequest.showPrompt. Blocking interaction involves removing focus from wherever it is and restoring it, which is clearly causing this problem. It sounds like in this case, you don't actually need to block interactivity and should set showPrompt to false via the requestProperties argument in whatever API you use to trigger the DMI.

    As for the problem with text becoming highlighted, this is fixed in later versions, but this shouldn't matter for you once you're setting showPrompt:false. However, you should be planning an upgrade, as you are now 4 releases behind.

    Comment


      #3
      Hi Isomorphic,

      1) Can you tell me what version of SmartGWT the highlighting problem is fixed: "...with text becoming highlighted, this is fixed in later versions, "

      2) Can you tell me how to tell if any cell is currently being edited on a list grip...
      What I mean is, if the cell has been clicked (we have set DoubleClick as the edit action: listGrid.setEditEvent(ListGridEditEvent.DOUBLECLICK))
      and an edit is in progress (ie: the user is actively inputting text into a cell).
      Last edited by siegersallee; 11 Jun 2018, 08:58.

      Comment


        #4
        1. we've never had it reported against 5.x versions, but it was fixed in 6.0+ when reported there

        2. getEditRow() / getEditCol() tells you what row and cell is being edited, and both return null if editing is not active

        Comment


          #5
          Thanks Isomorphic...

          Comment

          Working...
          X