Announcement

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

    FormItemIcon Disabling not working


    Hi Isomorphic,

    I am facing an issue while disabling FormItem field which has a link to FormItemIcon.

    Smartgwt version - 6.1-p20200816

    We have a requirement to create a DateTimeItem with icons(Refer SC-1). The icons are created using FormItemIcon and it is added to the form item field.
    But on certain condition I have to enable or disable the DateTimeItem. The problem we see here is when we disable the DateTimeItem, the icon added to it is not disabled properly (Refer SC-2).

    Code:

    DateTimeItem deadlineDateItem = new DateTimeItem("MAL_DEADLINE", "Deadline Date");
    deadlineDateItem.setUseTextField(true);
    deadlineDateItem.setDateFormatter(DateDisplayFormat.TOEUROPEANSHORTDATETIME);
    deadlineDateItem.setRequired(false);
    deadlineDateItem.setDisabled(true);

    warningIcon = new FormItemIcon();
    warningIcon.setSrc("[SKIN]/Dialog/warn.png");
    warningIcon.setPrompt("Warning");

    validateIcon = new FormItemIcon();
    validateIcon.setSrc("[SKIN]/actions/approve.png");
    validateIcon.addFormItemClickHandler(new FormItemClickHandler() {

    @Override
    public void onFormItemClick(FormItemIconClickEvent event) {
    deadLineConfirmation();

    }
    });

    deadlineDateItem.setIcons(warningIcon, validateIcon);


    Even the below code also breaks.
    warningIcon.setDisabled(true);
    validateIcon.setDisabled(true);


    Could you please help me on this ?


    Thanks,
    Manjula
    Attached Files

    #2
    Hi manjulam,

    see the DOM in disabled state with F12 tools. Perhaps the image has a "_disabled" suffix, and this 2nd file does not exist?

    Best regards
    Blama

    Comment


      #3
      Hi Blama,

      Yes, it is forming as "_Disabled.png", but I am loading image suing Skins.



      Thanks,
      Manjula
      Last edited by manjulam; 11 Dec 2020, 04:25.

      Comment


        #4
        Hi manjulam,

        just add the wanted image yourself. What images are included in a skin you can see in your war file.
        If you want different images, replace them with e.g. fontawesome.

        Best regards
        Blama

        Comment

        Working...
        X