Re: problem with ChoiceRenderer

2012-05-13 Thread Michael Jaruska
On 11.5.2012 12:21, Andrea Del Bene wrote: Hi, the type of the model and of the renderer must be the same chosen for the DropDownChoice (Vyrobok in your case). In the first version of your code this was not true for your model because it pointed to a String field (named kluc). Your second

problem with ChoiceRenderer

2012-05-11 Thread Michael Jaruska
Hi folks, after hours of elaborating, searching docu and trying I'm totaly lost. My ChoiceRenderer is not working. Here is my code (not relevant code has been removed): markup: select id=1 wicket:id=zoznam/select page implementation: public class PageEshop extends PageBase{ public

Re: problem with ChoiceRenderer

2012-05-11 Thread Sven Meier
Hi, Vyrobok defaultChoice = vyrobky.get(0); DropDownChoiceVyrobok vyberVyrobku = new DropDownChoiceVyrobok( zoznam, new PropertyModelVyrobok(defaultChoice, kluc), vyrobky, renderer); you're instructing

Re: problem with ChoiceRenderer

2012-05-11 Thread Michael Jaruska
just now I have elaborated that this works: DropDownChoiceVyrobok vyberVyrobku = new DropDownChoiceVyrobok(vyberVyrobku, new PropertyModelVyrobok(defaultChoice, null), vyrobky, renderer); (note `null' in PropertyModel) but strange is that I don't know why :-( On 11.5.2012 9:36, Sven Meier

Re: problem with ChoiceRenderer

2012-05-11 Thread Andrea Del Bene
Hi, the type of the model and of the renderer must be the same chosen for the DropDownChoice (Vyrobok in your case). In the first version of your code this was not true for your model because it pointed to a String field (named kluc). Your second version works fine because you don't provide