Announcement

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

    Hover customization not working?

    Hi Team,

    I have used Hover in my project. As part of tech stack upgrade we have upgraded our project into SmartGWT-6 version. After upgrading, Hover customization is not working. I have even tried with sample DEMO projects from showcase, it is also not working. Is there any changes?

    Source Code:
    ComboBoxItem filteredCombo = new ComboBoxItem();
    filteredCombo.setName("filteredCombo");
    filteredCombo.setTitle("Select Item");
    filteredCombo.setAddUnknownValues(false);
    filteredCombo.setOptionDataSource(CountrySampleData.getInstance());
    filteredCombo.setDisplayField("continent");
    filteredCombo.setValueField("Continent");
    filteredCombo.setPickListWidth(300);
    ListGridField continentField = new ListGridField("continent", "Continent");
    continentField.setShowHover(true);
    //continentField.setShowHoverComponents(true);

    //Below is the Source code which is causing issue, if I didn't use below setHoverCustomizer(), hower is showing. The same code was working fine in SmartGWT-3 version
    continentField.setHoverCustomizer(new HoverCustomizer() {
    public String hoverHTML(Object value, ListGridRecord record, int rowNum, int colNum) {
    return record.getAttributeAsString("IN");
    }
    });
    Last edited by subbareddynallamachu; 30 Apr 2018, 05:12.

    #2
    Your sample code seems to be incomplete, since you need to set :
    Code:
    filteredCombo.setPickListFields(continentField)
    Please, check and retest again.

    Regards
    Isomorphic Software

    Comment


      #3
      Thanks Isomorphic for your suggestion. But, unfortunately that was not solved my issue.

      I have figured out the problem. The problem is, in the below line I am passing the IN as input to getAttributeAsString().

      return record.getAttributeAsString("IN");


      It is trying to find IN field type where it was not present(my mistake). It started showing the proper value when I pass the correct field name. Like,

      return record.getAttributeAsString("continentField");
      Thanks again..
      Last edited by subbareddynallamachu; 30 Apr 2018, 04:32.

      Comment

      Working...
      X