svn changeset:19822/svn branch:6.7
private static final String MODIFIED_CLASSNAME = "v-modified";
+ public static final String DISABLED_CLASSNAME = "v-disabled";
+
private static final String REQUIRED_CLASSNAME_EXT = "-required";
private static final String ERROR_CLASSNAME_EXT = "-error";
// first disabling and read-only status
if (!enabled) {
styleBuf.append(" ");
- styleBuf.append("v-disabled");
+ styleBuf.append(DISABLED_CLASSNAME);
}
if (uidl.getBooleanAttribute("readonly")) {
styleBuf.append(" ");
client.updateVariable(id, EventId.BLUR, "", true);
}
+ @Override
+ public void setEnabled(boolean enabled) {
+ if (isEnabled() != enabled) {
+ super.setEnabled(enabled);
+ if (enabled) {
+ removeStyleName(ApplicationConnection.DISABLED_CLASSNAME);
+ } else {
+ addStyleName(ApplicationConnection.DISABLED_CLASSNAME);
+ }
+ }
+ }
+
}