Announcement

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

    HeaderHoverHandler not working for ListGrid

    Hi,

    We’re using SmartGWT 4.0p (November 2013 release) and GWT 2.5. Our goal is to add dynamic tooltip text for ListGrid component.
    Browsers: Chrome 34, Firefox 26, 28, IE 9

    There are following examples where used from your showcase:
    http://www.smartclient.com/smartgwt/showcase/#grid_interaction_header_hover

    We tried to add something like that into your code:
    countryGrid.addHeaderHoverHandler(new HeaderHoverHandler() {
    @Override
    public void onHeaderHover(HeaderHoverEvent event) {
    SC.say(event.getFieldNum() + "");
    }
    });

    We found that nothing happens on header hover, moreover the gwt:debug showed the same. We put break point on SC.say(event.getFieldNum() + ""); and it’s not reached.
    However, the countryGrid.addHeaderClickHandler works as designed.

    What we are doing wrong? Any ideas?

    Thanks a lot in advance,
    Sava

    #2
    Please try with the latest patched version of 4.0, or better yet, move to 4.1. 4.0 will soon stop receiving non-critical updates.

    If the problem still persists, post the full version you are using - remember to always do this.

    Comment


      #3
      Download URL

      Thanks. What is the URL for the patched 4.0.4 version? Is that https://smartclient.com/builds/SmartGWT/4.0p?

      Thanks,
      Sava.

      Comment


        #4
        That's right, yes

        Comment


          #5
          Is download site unavailable?

          It says:

          Service Temporarily Unavailable

          The server is temporarily unable to service your request due to maintenance downtime or capacity problems. Please try again later.

          Comment


            #6
            It's working fine for us - please retry

            Comment


              #7
              FYI: The network to http://forums.smartclient.com and http://www.smartclient.com (builds, showcases, webpage) is very slow for me as well since approx 1 hour. I'm accessing from Germany.

              Best regards,
              Blama

              Comment


                #8
                Still working fine from multiple points of access in the USA. You may be having local network issues.

                Comment


                  #9
                  HeaderHoverHandler still not working for ListGrid with 4.0.4

                  We tried your latest 4.0p and issue still exists. Migration to 4.1 is not an option for us now because of the possible regression.
                  Use case:
                  1) Mouse pointer hover Flag, Country, Capital, Nationhood
                  2) Text hint with Random.nextInt() + "TEST" appear

                  Actual: old hint shows countryCodeField.setPrompt("Small image of national flag"); and others
                  Expected: hint with Random.nextInt() + "TEST" appear


                  The source we’re using for test are below (original one on http://www.smartclient.com/smartgwt/showcase/#grid_interaction_header_hover):

                  Code:
                   
                  import com.smartgwt.client.types.Alignment;
                  import com.smartgwt.client.types.ListGridFieldType;
                  import com.smartgwt.client.widgets.Canvas;
                  import com.smartgwt.client.widgets.grid.ListGrid;
                  import com.smartgwt.client.widgets.grid.ListGridField;
                  import com.smartgwt.sample.showcase.client.data.CountrySampleData;
                   
                  import com.google.gwt.core.client.EntryPoint;
                   
                  public class HeaderHoverTipsSample implements EntryPoint {
                   
                      public void onModuleLoad() {
                   
                          final ListGrid countryGrid = new ListGrid();
                          countryGrid.setWidth(500);
                          countryGrid.setHeight(224);
                          countryGrid.setShowAllRecords(true);
                   
                          ListGridField countryCodeField = new ListGridField("countryCode", "Flag", 50);
                          countryCodeField.setAlign(Alignment.CENTER);
                          countryCodeField.setType(ListGridFieldType.IMAGE);
                          countryCodeField.setImageURLPrefix("flags/16/");
                          countryCodeField.setImageURLSuffix(".png");
                          countryCodeField.setPrompt("Small image of national flag");
                   
                          ListGridField nameField = new ListGridField("countryName", "Country");
                          nameField.setPrompt("Conventional short form of country name");
                   
                          ListGridField capitalField = new ListGridField("capital", "Capital");
                          capitalField.setPrompt("Location of seat of government");
                   
                          ListGridField nationHoodField = new ListGridField("independence", "Nationhood");
                          nationHoodField.setType(ListGridFieldType.DATE);
                          nationHoodField.setPrompt("Date of sovereignty, founding, or other significant nationhood event");
                   
                          countryGrid.setFields(countryCodeField, nameField, capitalField, nationHoodField);
                          countryGrid.setCanResizeFields(true);
                          countryGrid.setData(CountrySampleData.getRecords());
                          countryGrid.addHeaderHoverHandler(new HeaderHoverHandler() {
                              @Override
                              public void onHeaderHover(HeaderHoverEvent event) {
                                  countryGrid.getField(event.getFieldNum()).setPrompt(Random.nextInt() + "TEST");//put break point here – never riched
                              }
                          });
                   
                          countryGrid.draw();
                      }
                   
                  }

                  Comment


                    #10
                    The issue here is a subtle one - the specified "prompt" is being used in preference to the header hover behavior.
                    If you remove the prompts from the listGrid field, the hover notification method should run as expected.
                    If you want to show customized hover prompts, you can use the Hover.show() API.

                    We'll look into whether we can make the interaction with specified prompts more intuitive going forward but we will likely not be porting any changes to that area back to 4.0

                    Regards
                    Isomorphic Software

                    Comment


                      #11
                      Actually on further investigation it appears this method may not be firing when it should. We're performing some more investigation and will follow up with more information when we have it.

                      Regards
                      Isomorphic Software

                      Comment


                        #12
                        HeaderHoverHandler not working for ListGrid

                        Thanks a lot!

                        Comment


                          #13
                          We've made some changes to the 4.0, 4.1 and 5.0 branches which should resolve this issue.
                          Please try the next nightly build dated Jun 1 or above

                          Regards
                          Isomorphic Software

                          Comment


                            #14
                            HeaderHoverHandler not working for ListGrid - fixed

                            Thanks a lot - it works well... You provided us with nightly build. Do you plan to provide a fix in a some patched, stable version, too?

                            Thanks in advance,
                            Sava.

                            Comment


                              #15
                              You've already got a stable build. Please review SmartClient.com/builds for information about the different kinda of builds we provide.

                              Comment

                              Working...
                              X