Announcement

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

    6.1p Bug?: EditorExitHandler with External DS Stuck in Listgrid Field

    Migrating from SmartGWT EE 6.0p to SmartGWT EE 6.1p and found EditorExitHandler with External DS in ListGrid has some issue in 6.1p: Pressing Tab key will not move out of the field. Worked fine in 6.0p. Seems to have no problem if using Client Side DS in 6.1p also.

    SmartGWT EE Version: SmartClient Version: v11.1p_2017-08-07/Enterprise Deployment (built 2017-08-07)
    GWT Version: 2.7.0

    Click image for larger version

Name:	TestA.png
Views:	117
Size:	13.5 KB
ID:	248180
    In the following test case, Tab will not move out of TEST A.

    FrmMainSearch.java

    mHoliday.ds.xml

    server.properties:
    sql.defaultDatabase: myConnection
    sql.myConnection.driver.name: java:comp/env/jdbc/retrievead
    sql.myConnection.database.type: oracle
    sql.myConnection.interface.type: jndi

    #2
    Hi!

    Any comment from Isomorphic whether the difference in behaviour between 6.0 and 6.1 is a bug in 6.1 or something that I have done incorrectly?

    Thank you very much.

    Comment


      #3
      Hi OPY,

      I'm not sure it is allowed to have testA.addEditorExitHandler after userList.setFields. Can you test if it's the same if you reverse the order?

      Best regards
      Blama

      Comment


        #4
        Hi Balma,

        Thank you very much for your suggestion.

        Tested the following, but the result is the same (not working as expected like in 6.0p):

        Code:
        testA.addEditorExitHandler(new com.smartgwt.client.widgets.grid.events.EditorExitHandler(){
        
          @Override
          public void onEditorExit(com.smartgwt.client.widgets.grid.events.EditorExitEvent event) {
          DataSource.get("mHoliday").fetchData(new Criteria(), new DSCallback(){
        
          @Override
          public void execute(DSResponse dsResponse, Object data, DSRequest dsRequest) {
          // TODO Auto-generated method stub
         }
        });
        }
         });
        
        userList.setFields(  
                        testA,
                        new ListGridField("EDIT_BY", "TEST B")
                        );

        Comment


          #5
          The issue here is that when the dataSource operation is called, a blocking prompt is shown - which makes it impossible for focus to shift to the next editable item in the ListGrid.
          The easiest solution is to avoid showing the prompt by calling 'setShowPrompt(false)' on the request configuration when making the dataSource request.

          Something like this:
          Code:
                  testA.addEditorExitHandler(new com.smartgwt.client.widgets.grid.events.EditorExitHandler(){
          
                      @Override
                      public void onEditorExit(com.smartgwt.client.widgets.grid.events.EditorExitEvent event) {
                          DataSource.get("mHoliday").fetchData(new Criteria(), new DSCallback(){
          
                              @Override
                              public void execute(DSResponse dsResponse, Object data, DSRequest dsRequest) {
                                  // TODO Auto-generated method stub
          
                              }
          
                          },
                          new DSRequest() {{
                              setShowPrompt(false);
                          }});
                      }
          
                  });
          Regards
          Isomorphic Software

          Comment


            #6
            Noted. Thank you very much for your help!

            Comment

            Working...
            X