Announcement

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

    How do I set the hover text of a ListGrid value icon?

    SmartClient Version: v9.1p_2016-01-13/PowerEdition Deployment (built 2016-01-13)


    I currently have a ListGrid with an overrided getValueIcon function that will show an icon in a field if that field contains validation errors.
    ListGrid previewGrid = new ListGrid(){
    @Override
    public String getValueIcon(ListGridField field, Object value, ListGridRecord record){
    String error = record.getAttribute("validation_errors");
    String errorHtml = "";
    if(errors != null){
    errorHtml = ImagesUtil.getValidationErrorIcon();
    }
    return errorHtml;
    }
    };

    How do I set the hover text of the icon?
    Last edited by ewilliams; 11 Nov 2016, 07:32.

    #2
    bump

    Comment


      #3
      Hi,
      Sorry for the silence this was not being ignored - we just hadn't had a chance to respond yet.

      The answer is that we don't currently support specifying an explicit hover prompt for a custom valueIcon.
      valueIcons were designed as a visual representation of a value or to augment values with an icon for emphasis rather than being a replacement for a validation error.

      If this is a need for you, we could possibly add support for value-icon specific hover and prompt behavior as a feature sponsorship. Let us know if this is something you'd like to pursue.

      Alternatively, for a quick solution, you could get a custom icon by simply using Canvas.imgHTML() to generate your desired icon, and use the "extraStuff" parameter to include a title attribute for the image tag (relying on native browser tooltip prompt display behavior).

      Also, we do of course have built in validation error icon behavior (complete with error message on hover). We're curious why you've found you had to go down the route of hacking validation error icon display into valueIcons rather than using this feature directly?

      Regards
      Isomorphic Software

      Comment


        #4
        Thank you for your reply.

        The reason we implemented our own validation is because we were not able to get the desired behavior in our application by using the built-in field validators. However, we have just discovered the setRowErrors() function in the List Grid which gives us exactly what we need. We will proceed to use this solution.

        Thanks again for your help.

        Comment

        Working...
        X