How to get the selected values in ChosenListBox in GWT give sample
final ChosenListBox teamChosen = new ChosenListBox(true);
teamChosen.getElement().setId("data");//multiple
// init options for teamchosen
String[] teams = new String[] {
"Dallas Cowboys", "New York Giants", "Philadelphia Eagles", "Washington Redskins",
"Chicago Bears", "Detroit Lions", "Green Bay Packers", "Minnesota Vikings",
"Atlanta Falcons", "Carolina Panthers", "New Orleans Saints", "Tampa Bay Buccaneers",
"Arizona Cardinals", "St. Louis Rams", "San Francisco 49ers", "Seattle Seahawks",
"Buffalo Bills", "Miami Dolphins", "New England Patriots", "New York Jets",
"Baltimore Ravens", "Cincinnati Bengals", "Cleveland Browns", "Pittsburgh Steelers",
"Houston Texans", "Indianapolis Colts", "Jacksonville Jaguars", "Tennessee Titans",
"Denver Broncos", "Kansas City Chiefs", "Oakland Raiders", "San Diego Chargers"};
for (String team : teams) {
teamChosen.addItem(team);
}
teamChosen.setPlaceholderText("Choose your favourite teams");
root.add(teamChosen,20,0);
teamChosen.setMaxSelectedOptions(3);
-- teamChosen.getElement().setId("data");//multiple
// init options for teamchosen
String[] teams = new String[] {
"Dallas Cowboys", "New York Giants", "Philadelphia Eagles", "Washington Redskins",
"Chicago Bears", "Detroit Lions", "Green Bay Packers", "Minnesota Vikings",
"Atlanta Falcons", "Carolina Panthers", "New Orleans Saints", "Tampa Bay Buccaneers",
"Arizona Cardinals", "St. Louis Rams", "San Francisco 49ers", "Seattle Seahawks",
"Buffalo Bills", "Miami Dolphins", "New England Patriots", "New York Jets",
"Baltimore Ravens", "Cincinnati Bengals", "Cleveland Browns", "Pittsburgh Steelers",
"Houston Texans", "Indianapolis Colts", "Jacksonville Jaguars", "Tennessee Titans",
"Denver Broncos", "Kansas City Chiefs", "Oakland Raiders", "San Diego Chargers"};
for (String team : teams) {
teamChosen.addItem(team);
}
teamChosen.setPlaceholderText("Choose your favourite teams");
root.add(teamChosen,20,0);
teamChosen.setMaxSelectedOptions(3);
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/groups/opt_out.
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home