@SuppressWarnings("unchecked")
public final List<Culture> findCultures() {
final List<Culture> cultures = new ArrayList<Culture>();
final Iterator<Item> items =
ratingScalesView.getItems();
if (items != null) {
while (items.hasNext()) {
cultures.add((Culture)
items.next().getModelObject());
}
}
return cultures;
}
-----Original Message-----
From: Mathias P.W Nilsson [mailto:[EMAIL PROTECTED]
Sent: Friday, May 09, 2008 7:37 AM
To: [email protected]
Subject: How to get select objects from ListView
Hi!
I have this list view
ListView view = new ListView( "translatorView" , cultureModel ){
private static final long serialVersionUID = 1L;
@Override
protected void populateItem(ListItem item) {
Culture culture = (Culture)
item.getModelObject();
item.add( new Label( "culture" ,
culture.getName() ));
DropDownChoice translatorChoice = new
DropDownChoice( "translatorChoice", new
LoadableDetachableTranslatorModel( culture) , new
FtcUserChoiceRenderer() ){
private static final long
serialVersionUID = 1L;
@Override
protected java.lang.CharSequence
getDefaultChoice(final Object selected){
return "<option
value=\"\">"+ getLocalizer().getString( "culture.select.empty",
TranslatorInvitationPage.this ) + "</option>";
}
};
item.add( translatorChoice );
}
};
The model is a detached model for users. How can I get the list of drop
down choice model objects?
--
View this message in context:
http://www.nabble.com/How-to-get-select-objects-from-ListView-tp17146212
p17146212.html
Sent from the Wicket - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]