I have a palette defined with a set of available choices.  I can move
those choices to the right into the selected choices.  On my page I have
a modal popup that can be launched to add a custom choice.  The choice
is added to the available choices in the palette but the selected
choices are reset.  How do I keep the selected choices set and add the
new choice to remaining available choices.  I have done a Google search
but don't have the correct keywords to find anything useful.  The key
pieces of code are below.  Thanks.

 

 

 

Private List definedOptions = new ArrayList();

 

 

 

// code found in constructor of page

 

final Palette palette = new Palette("options", new
Model((Serializable)definedOptions), renderer, 10, true);

 

palette.setMarkupId("palette");

 

palette.setOutputMarkupId(true);

 

palette.setOutputMarkupPlaceholderTag(true);

 

add(palette);

 

 

 

// code found in the onclick of the AjaxLink on the page

 

definedOptions.add(opt);

 

target.addComponent(palette);

 

 

 

 

 

 

 

_______________________________________ 

Jeffrey A. Schneller

 

Envisa

End-to-End E-Commerce for the Multi-Channel Merchant

 

281 Pleasant Street

Framingham, MA  01701

P: (508) 405-1220 x115

C: (508) 954-8044

F: (508) 405-1219

 

Reply via email to