If I understood correctly you would want to do this (which It can be found
at Palette comments at the begining)
<strong>Ajaxifying the palette</strong>: The palette itself cannot be
ajaxified because it is a
panel and therefore does not receive any javascript events. Instead ajax
behaviors can be
attached to the recorder component which supports the javascript
<code>onchange</code> event. The
recorder component can be retrieved via a call to {...@link
#getRecorderComponent()}.
Example:
<pre>
Form form=new Form(...);
Palette palette=new Palette(...);
palette.getRecorderComponent().add(new
AjaxFormComponentUpdatingBehavior("onchange") {...});
Then when someone click in any of the buttons you can take a decision over
the selected items or choiced items. You can do this without ajax replacing
the newUp, new newDown protected methods.
I hope I help you a bit.
On Mon, Jun 22, 2009 at 12:08 PM, Rangel Preis <[email protected]> wrote:
> Hi, how can i filter the possible choices in the palette component i
> read the topics below put it not helpful for me.
>
>
> http://www.nabble.com/how-to-add-filter-for-Palette-choice-td23269578.html#a23269578
>
> http://www.nabble.com/changing-choices-component-in-Palette-td23982514.html#a23982514
>
> I have this:
>
> final IChoiceRenderer<String> renderer = new
> ChoiceRenderer<String>("name", "name");
> form.add(new Palette("paletteDiretores", selectedItens,
> availableItens, renderer, 10, true));
>
> And a button:
>
> AjaxLink btFilterPaletteContent = new AjaxLink("btFilterPaletteContent"){
>
> @Override
> public void onClick(AjaxRequestTarget target) {
> availableItens = search new itens....
> }
> };
>
> I try this and don't work, if i inspect the objet the value is OK, but
> in the screen the palette become blank.
>
> i try to use propertymodel to avaliableitens... don't work too..
> I just want to chance the content of the avaliable itens in the panel
> without affect the selecteds itens.
>
> Anyone can help me?
>
> Thanks.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>
--
Fernando Wermus.
www.linkedin.com/in/fernandowermus