Re: getChoices from ListMultipleChoice

2012-07-26 Thread cosmindumy
Thanks
It helped me. But just another problem.
I have a customized multiple choice with 2 multiple ListMultipleChoice
inside. and movieng selected choices from each other. 
I have problems with safe cast.

Here is my class definition:
public class CusomizedMultipleChoiceT extends Panel

Here are the two method I used.

CollectionT leftChoices = leftChoice.getChoices();
CollectionT selectedLeftChoices = leftChoice.getModelObject();

The compiler complains at first method. getChoices. Shouldn't return return
a collection of T.  compiler ask me to cast at CollectionT. Is it safe to
do this?
I checked the wicket sources but couldn't find the cause.
Is anything wrong?
Thanks. 



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/getChoices-from-ListMultipleChoice-tp4650725p4650790.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: getChoices from ListMultipleChoice

2012-07-26 Thread cosmindumy
Thanks
It helped me. But just another problem. 
I have a customized multiple choice with 2 multiple ListMultipleChoice
inside. and movieng selected choices from each other. 

I have problems with safe cast. 

Here is my class definition: 
public class CusomizedMultipleChoiceT extends Panel 

Here are the two method I used.

CollectionT leftChoices = leftChoice.getChoices();
CollectionT selectedLeftChoices = leftChoice.getModelObject();

The compiler complains at first method. getChoices. Shouldn't return return
a collection of T.  compiler ask me to cast at CollectionT. Is it safe to
do this?
I checked the wicket sources but couldn't find the cause. 
Is anything wrong?
Thanks. 




--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/getChoices-from-ListMultipleChoice-tp4650725p4650789.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: getChoices from ListMultipleChoice

2012-07-24 Thread cosmindumy
Hi,
Just tried at home and still get null on getModelObject(). 
Here is the complete code: 
http://shorttext.com/oSTpzOm

Thanks. 



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/getChoices-from-ListMultipleChoice-tp4650725p4650745.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: getChoices from ListMultipleChoice

2012-07-24 Thread Igor Vaynberg
AjaxLink does not submit the form. use AjaxButton instead.

also, you need to give the dropdownchoice a model (somewhere to store
the value)...see form examples.

-igor

On Tue, Jul 24, 2012 at 9:20 AM, cosmindumy cosmind...@yahoo.com wrote:
 Hi,
 Just tried at home and still get null on getModelObject().
 Here is the complete code:
 http://shorttext.com/oSTpzOm

 Thanks.



 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/getChoices-from-ListMultipleChoice-tp4650725p4650745.html
 Sent from the Users forum mailing list archive at Nabble.com.

 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org


-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



getChoices from ListMultipleChoice

2012-07-23 Thread cosmindumy
Hi,
I'm trying to get the selected options from a ListMultipleChoice but didn't
find a method to get a collection of selected options. 
I'm using the getValue method that return a String of choices separated by ;
but I'm sure is not right. 
What method should I use? 
Thanks. 



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/getChoices-from-ListMultipleChoice-tp4650725.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: getChoices from ListMultipleChoice

2012-07-23 Thread Thomas Matthijs
On Mon, Jul 23, 2012 at 3:53 PM, cosmindumy cosmind...@yahoo.com wrote:
 Hi,
 I'm trying to get the selected options from a ListMultipleChoice but didn't
 find a method to get a collection of selected options.
 I'm using the getValue method that return a String of choices separated by ;
 but I'm sure is not right.
 What method should I use?

getModel(), getModelObject()

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: getChoices from ListMultipleChoice

2012-07-23 Thread Martin Grigorov
getModel(Object)

On Mon, Jul 23, 2012 at 4:53 PM, cosmindumy cosmind...@yahoo.com wrote:
 Hi,
 I'm trying to get the selected options from a ListMultipleChoice but didn't
 find a method to get a collection of selected options.
 I'm using the getValue method that return a String of choices separated by ;
 but I'm sure is not right.
 What method should I use?
 Thanks.



 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/getChoices-from-ListMultipleChoice-tp4650725.html
 Sent from the Users forum mailing list archive at Nabble.com.

 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org




-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: getChoices from ListMultipleChoice

2012-07-23 Thread Igor Vaynberg
(Collection)getModelObject()

-igor

On Mon, Jul 23, 2012 at 4:53 PM, cosmindumy cosmind...@yahoo.com wrote:
 Hi,
 I'm trying to get the selected options from a ListMultipleChoice but didn't
 find a method to get a collection of selected options.
 I'm using the getValue method that return a String of choices separated by ;
 but I'm sure is not right.
 What method should I use?
 Thanks.



 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/getChoices-from-ListMultipleChoice-tp4650725.html
 Sent from the Users forum mailing list archive at Nabble.com.

 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org


-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: getChoices from ListMultipleChoice

2012-07-23 Thread cosmindumy
Hi again,
Sorry. I forgot to say that I tried this and I get null. 
I thing we change something in our framework and the wicket doesn't handle
properly the multiple choice. 
Does anyone has an idea what can be? 



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/getChoices-from-ListMultipleChoice-tp4650725p4650730.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: getChoices from ListMultipleChoice

2012-07-23 Thread Igor Vaynberg
:/

-igor

On Mon, Jul 23, 2012 at 4:56 PM, Martin Grigorov mgrigo...@apache.org wrote:
 getModel(Object)

 On Mon, Jul 23, 2012 at 4:53 PM, cosmindumy cosmind...@yahoo.com wrote:
 Hi,
 I'm trying to get the selected options from a ListMultipleChoice but didn't
 find a method to get a collection of selected options.
 I'm using the getValue method that return a String of choices separated by ;
 but I'm sure is not right.
 What method should I use?
 Thanks.



 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/getChoices-from-ListMultipleChoice-tp4650725.html
 Sent from the Users forum mailing list archive at Nabble.com.

 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org




 --
 Martin Grigorov
 jWeekend
 Training, Consulting, Development
 http://jWeekend.com

 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org


-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org