Re: How to get select objects from ListView

2008-05-09 Thread Martin Makundi
What do you need them for? Why not pick them up when they are created?

2008/5/9 Mathias P.W Nilsson [EMAIL PROTECTED]:

 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-tp17146212p17146212.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]



Re: How to get select objects from ListView

2008-05-09 Thread Mathias P.W Nilsson

When submit is pressed I need to get an array of selected users.

It can contain 100 drop down boxes and I want the selected user in each drop
down.
-- 
View this message in context: 
http://www.nabble.com/How-to-get-select-objects-from-ListView-tp17146212p17146322.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]



Re: How to get select objects from ListView

2008-05-09 Thread Maurice Marrink
Or just the selectionmodels for the combos.

Maurice

On Fri, May 9, 2008 at 2:00 PM, Martin Makundi
[EMAIL PROTECTED] wrote:
 Why don't you just add the combos into a list during the populate event?


 2008/5/9 Mathias P.W Nilsson [EMAIL PROTECTED]:

 When submit is pressed I need to get an array of selected users.

 It can contain 100 drop down boxes and I want the selected user in each drop
 down.
 --
 View this message in context: 
 http://www.nabble.com/How-to-get-select-objects-from-ListView-tp17146212p17146322.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]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: How to get select objects from ListView

2008-05-09 Thread Mathias P.W Nilsson

Of course :) thanks. 
-- 
View this message in context: 
http://www.nabble.com/How-to-get-select-objects-from-ListView-tp17146212p17146720.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]



RE: How to get select objects from ListView

2008-05-09 Thread Hoover, William
@SuppressWarnings(unchecked)
public final ListCulture findCultures() {
final ListCulture cultures = new ArrayListCulture();
final IteratorItem 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: users@wicket.apache.org
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]