Type Parameters:
T - Type of model object
All Implemented Interfaces:
Serializable, Iterable<Component>, IEventSink, IEventSource, IFeedbackContributor, IConverterLocator, IGenericComponent<Collection<T>,FormComponent<Collection<T>>>, IMetadataContext<Serializable,Component>, IQueueRegion, IFormModelUpdateListener, IFormVisitorParticipant, ILabelProvider<String>, IHeaderContributor, IRequestableComponent, IHierarchical<Component>, IClusterable

public class Palette<T> extends FormComponentPanel<Collection<T>>
Palette is a component that allows the user to easily select and order multiple items by moving them from one select box into another.

When creating a Palette object make sure your IChoiceRenderer returns a specific ID, not the index.

Ajaxifying the palette: If you want to update a Palette with an AjaxFormComponentUpdatingBehavior, you have to attach it to the contained Recorder by overriding newRecorderComponent() and calling FormComponent.processInput():

  Palette palette=new Palette(...) {
    protected Recorder newRecorderComponent()
      Recorder recorder=super.newRecorderComponent();     
      recorder.add(new AjaxFormComponentUpdatingBehavior("change") {
        protected void onUpdate(AjaxRequestTarget target) {
          processInput(); // let Palette process input too

      return recorder;
You can add a DefaultTheme to style this component in a left to right fashion.
Igor Vaynberg ( ivaynberg )
See Also: