Nuxeo ECM Projects 5.6-RC1

org.nuxeo.ecm.platform.ui.web.util
Class SelectionActionsBean

java.lang.Object
  extended by org.nuxeo.ecm.platform.ui.web.util.SelectionActionsBean
All Implemented Interfaces:
Serializable

@Name(value="selectionActions")
@Scope(value=EVENT)
public class SelectionActionsBean
extends Object
implements Serializable

Helper for selection actions, useful when performing ajax calls on a "liste shuttle" widget for instance, or to retrieve the selected value on a JSF component and set it on another.

See Also:
Serialized Form

Nested Class Summary
static class SelectionActionsBean.ShiftType
           
 
Constructor Summary
SelectionActionsBean()
           
 
Method Summary
 void addAllToSelection(ActionEvent event)
           
 void addToSelection(ActionEvent event)
           
 SelectItem[] getEmptySelection()
           
 String getSelectedValue()
           
 String getSelectedValueHolder()
           
 UISelectMany getSourceSelectComponent(ActionEvent event)
           
 UISelectItems getSourceSelectItems(ActionEvent event)
           
 void onClick(ActionEvent event)
          Adds value retrieved from getSelectedValue() to a component
 void onSelection(ActionEvent event)
          Adds selection retrieved from a selector to another component
 void removeAllFromSelection(ActionEvent event)
           
 void removeFromSelection(ActionEvent event)
           
 void setSelectedValue(String selectedValue)
           
 void setSelectedValueHolder(String selectedValueHolder)
           
 void shiftSelected(SelectionActionsBean.ShiftType stype, ActionEvent event)
           
 void shiftSelectedDown(ActionEvent event)
           
 void shiftSelectedFirst(ActionEvent event)
           
 void shiftSelectedLast(ActionEvent event)
           
 void shiftSelectedUp(ActionEvent event)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SelectionActionsBean

public SelectionActionsBean()
Method Detail

getSelectedValue

public String getSelectedValue()

setSelectedValue

public void setSelectedValue(String selectedValue)

getSelectedValueHolder

public String getSelectedValueHolder()

setSelectedValueHolder

public void setSelectedValueHolder(String selectedValueHolder)

getEmptySelection

public SelectItem[] getEmptySelection()

shiftSelected

public void shiftSelected(SelectionActionsBean.ShiftType stype,
                          ActionEvent event)

shiftSelectedUp

public void shiftSelectedUp(ActionEvent event)
                     throws ClientException
Throws:
ClientException

shiftSelectedDown

public void shiftSelectedDown(ActionEvent event)
                       throws ClientException
Throws:
ClientException

shiftSelectedFirst

public void shiftSelectedFirst(ActionEvent event)
                        throws ClientException
Throws:
ClientException

shiftSelectedLast

public void shiftSelectedLast(ActionEvent event)
                       throws ClientException
Throws:
ClientException

addToSelection

public void addToSelection(ActionEvent event)
                    throws ClientException
Throws:
ClientException

removeFromSelection

public void removeFromSelection(ActionEvent event)
                         throws ClientException
Throws:
ClientException

addAllToSelection

public void addAllToSelection(ActionEvent event)

getSourceSelectComponent

public UISelectMany getSourceSelectComponent(ActionEvent event)

getSourceSelectItems

public UISelectItems getSourceSelectItems(ActionEvent event)

removeAllFromSelection

public void removeAllFromSelection(ActionEvent event)
                            throws ClientException
Throws:
ClientException

onSelection

public void onSelection(ActionEvent event)
Adds selection retrieved from a selector to another component

Must pass request parameters "selectorId" holding the id of component holding the value to pass to the other component, and "valueHolderId" holding the other component id.

Parameters:
event -
Since:
5.5

onClick

public void onClick(ActionEvent event)
Adds value retrieved from getSelectedValue() to a component

Must pass request parameters "valueHolderId" holding the id of the bound component, and call setSelectedValue(String) prior to this call.

As an alternative, must call setSelectedValueHolder(String) with the id of the bound component, and call setSelectedValue(String) prior to this call (this makes it possible to use the same logic in command buttons that do not make it possible to pass request parameters).

Parameters:
event -
Since:
5.5

Nuxeo ECM Projects 5.6-RC1

Copyright © 2012 Nuxeo SA. All Rights Reserved.