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
Comment