You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by bremy <ha...@bremy.com> on 2011/05/02 05:24:39 UTC

wicket extensions - Palette Problem

Hi I'm using wicket extensions 1.4.17. 
I came across a problem with adding selection on Palette. 

... 
.. 
add(form); 

List<String> available = new ArrayList<String>(); 
original.add("A"); 
original.add("B"); 
original.add("C"); 
original.add("D"); 
original.add("E"); 

Palette<String> palette = new Palette<String>("palette", new
ListModel<String>(available.subList(1,2)), 
                new CollectionModel<String>(available), new
ChoiceRenderer(), 10, false); 
form.add(palette); 

selection list is sublist of available but this only displays 

A on the selected list and nothing on available list. 

Any help will be appreciated. 

Thanks!--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/wicket-extensions-Palette-Problem-tp3489257p3489257.html
Sent from the Users forum mailing list archive at Nabble.com.

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


Re: wicket extensions - Palette Problem

Posted by Andrea Del Bene <ad...@ciseonweb.it>.
Ok, I think I got it.
You should add to choice render an empty id and value expression, i.e. 
new ChoiceRenderer("", ""). Without any expression any choices is 
recognized as selected.
> Hi I'm using wicket extensions 1.4.17.
> I came across a problem with adding selection on Palette.
>
> ...
> ..
> add(form);
>
> List<String>  available = new ArrayList<String>();
> original.add("A");
> original.add("B");
> original.add("C");
> original.add("D");
> original.add("E");
>
> Palette<String>  palette = new Palette<String>("palette", new
> ListModel<String>(available.subList(1,2)),
>                  new CollectionModel<String>(available), new
> ChoiceRenderer(), 10, false);
> form.add(palette);
>
> selection list is sublist of available but this only displays
>
> A on the selected list and nothing on available list.
>
> Any help will be appreciated.
>
> Thanks!--
> View this message in context: http://apache-wicket.1842946.n4.nabble.com/wicket-extensions-Palette-Problem-tp3489257p3489257.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>
>


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


Re: wicket extensions - Palette Problem

Posted by Andrea Del Bene <ad...@ciseonweb.it>.
The same using wicket 1.5 snapshot. I'm debugging the class searching 
for a solution.
> Hi I'm using wicket extensions 1.4.17.
> I came across a problem with adding selection on Palette.
>
> ...
> ..
> add(form);
>
> List<String>  available = new ArrayList<String>();
> original.add("A");
> original.add("B");
> original.add("C");
> original.add("D");
> original.add("E");
>
> Palette<String>  palette = new Palette<String>("palette", new
> ListModel<String>(available.subList(1,2)),
>                  new CollectionModel<String>(available), new
> ChoiceRenderer(), 10, false);
> form.add(palette);
>
> selection list is sublist of available but this only displays
>
> A on the selected list and nothing on available list.
>
> Any help will be appreciated.
>
> Thanks!--
> View this message in context: http://apache-wicket.1842946.n4.nabble.com/wicket-extensions-Palette-Problem-tp3489257p3489257.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>
>


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