Enabled disabled GWT ValueListBox

303 views
Skip to first unread message

Luis Costa

unread,
Jan 19, 2013, 12:51:43 PM1/19/13
to google-we...@googlegroups.com
Hi all,
I'm using GWT 2.5 and I'm wondering if there's an easy way to enabled / disabled ValueListBox, after a careful look:

DateBox, TextBox implements com.google.gwt.user.client.ui.HasEnabled but in other hand ValueListBox dosent
I could extend com.google.gwt.user.client.ui.ValueListBox and implement com.google.gwt.user.client.ui.HasEnabled doing:

@Override
public void setReadOnly(boolean readOnly) {
DOM.setElementPropertyBoolean(getElement(), "disabled", readOnly);
}

@Override
public boolean isReadOnly() {
return DOM.getElementPropertyBoolean(getElement(), "disabled");
}

But is there realy necessary?
Is  there a easy and logic way of doing this (disabled enabled)?

Many thanks,
Luis.

Luis Costa

unread,
Jan 19, 2013, 12:58:26 PM1/19/13
to google-we...@googlegroups.com
Sorry, obviousy what I mean in code sample (after implementing in my own ValueListBox HasEnabled interface) was:

@Override
public boolean isEnabled() {
return DOM.getElementPropertyBoolean(getElement(), "disabled");
}

@Override
public void setEnabled(boolean enabled) {
DOM.setElementPropertyBoolean(getElement(), "disabled", enabled);
}

Patrick Tucker

unread,
Jan 20, 2013, 2:29:09 PM1/20/13
to google-we...@googlegroups.com
 
Star the issue so you can get notified when the capability is added.
Reply all
Reply to author
Forward
0 new messages