Monday, September 25, 2017

Re: ListBox how set selected item by value

private void setSelectedValue(ListBox lBox, String str) {
String text = str;
int indexToFind = -1;
for (int i = 0; i < lBox.getItemCount(); i++) {
//Match by Value
if (lBox.getValue(i).equals(text)) {
indexToFind = i;
//Match by Text 
                       if (lBox.getItemText(i).equals(text)) {
indexToFind = i;

On Wednesday, May 20, 2009 at 1:02:22 PM UTC+5:30, zeroonea wrote:
when i load data to form to edit, how i set selected item in listbox
by value

You received this message because you are subscribed to the Google Groups "GWT Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
To post to this group, send email to
Visit this group at
For more options, visit

No comments:

Post a Comment