Nuxeo Enterprise Platform 5.4

org.nuxeo.ecm.platform.ui.web.directory
Class ChainSelect

java.lang.Object
  extended by javax.faces.component.UIComponent
      extended by javax.faces.component.UIComponentBase
          extended by javax.faces.component.UIOutput
              extended by javax.faces.component.UIInput
                  extended by org.nuxeo.ecm.platform.ui.web.directory.ChainSelect
All Implemented Interfaces:
javax.faces.component.EditableValueHolder, javax.faces.component.StateHolder, javax.faces.component.ValueHolder

public class ChainSelect
extends javax.faces.component.UIInput

DOCUMENT ME.

Refactor me and it's christmas.

Author:
George Lefter

Field Summary
static java.lang.String COMPONENT_FAMILY
           
static java.lang.String COMPONENT_TYPE
           
static java.lang.String DEFAULT_KEY_SEPARATOR
           
static java.lang.String DEFAULT_PARENT_KEY
           
 
Fields inherited from class javax.faces.component.UIInput
CONVERSION_MESSAGE_ID, REQUIRED_MESSAGE_ID, UPDATE_MESSAGE_ID
 
Constructor Summary
ChainSelect()
           
 
Method Summary
 void addToSelectionKeyList(java.lang.String key)
           
 Selection createSelection(java.util.List<java.lang.String> columns)
           
 Selection createSelection(java.lang.String[] columns)
           
 void decode(javax.faces.context.FacesContext context)
           
 void encodeBegin(javax.faces.context.FacesContext context)
           
 void encodeEnd(javax.faces.context.FacesContext context)
           
 java.lang.String[] encodeValue(Selection[] selections)
           
static java.lang.String format(java.lang.Object o)
           
static java.lang.String formatAr(java.lang.String[] ar)
           
 java.lang.Boolean getBooleanProperty(java.lang.String name, boolean defaultValue)
           
 ChainSelectListboxComponent getComponent(int i)
           
 Selection[] getComponentValue()
           
 java.lang.String getCssStyle()
           
 java.lang.String getCssStyleClass()
           
 java.lang.String getDefaultRootKey()
           
 java.lang.Boolean getDisplayValueOnly()
           
 java.lang.String getDisplayValueOnlyStyle()
           
 java.lang.String getDisplayValueOnlyStyleClass()
           
 java.lang.String getFamily()
           
 java.lang.String getKeySeparator()
           
 int getLastSelectedComponentIndex()
           
 java.lang.Boolean getLocalize()
           
 boolean getMultiParentSelect()
           
 java.lang.String getOnchange()
           
 java.util.Map<java.lang.String,DirectorySelectItem> getOptions(int index)
           
 java.lang.Object getProperty(java.lang.String name)
           
 java.lang.String getRendererType()
           
 Selection getSelection(int i)
           
 java.util.List<java.lang.String> getSelectionKeyList()
           
 Selection[] getSelections()
           
 java.lang.Integer getSize()
           
 java.lang.String getStringProperty(java.lang.String name, java.lang.String defaultValue)
           
 boolean isAllowBranchSelection()
           
 boolean isAllowRootSelection()
           
 boolean isMultiSelect()
           
 boolean isQualifiedParentKeys()
           
 void rebuildOptions()
          If the user changes selection for position k, all options for n>k will be reset.
 void restoreState(javax.faces.context.FacesContext context, java.lang.Object state)
           
 java.lang.Object saveState(javax.faces.context.FacesContext arg0)
           
 void setAllowBranchSelection(boolean allowBranchSelection)
           
 void setAllowRootSelection(boolean allowRootSelection)
           
 void setCompAtIndex(int index, ChainSelectListboxComponent comp)
           
 void setComponentValue(Selection[] componentValue)
           
 void setCssStyle(java.lang.String cssStyle)
           
 void setCSsStyleClass(java.lang.String cssStyleClass)
           
 void setDefaultRootKey(java.lang.String defaultRootKey)
           
 void setDisplayValueOnly(java.lang.Boolean displayValueOnly)
           
 void setDisplayValueOnlyStyle(java.lang.String displayValueOnlyStyle)
           
 void setDisplayValueOnlyStyleClass(java.lang.String displayValueOnlyStyleClass)
           
 void setKeySeparator(java.lang.String keySeparator)
           
 void setLastSelectedComponentIndex(int index)
           
 void setLocalize(java.lang.Boolean localize)
           
 void setMultiParentSelect(boolean multiParentSelect)
           
 void setMultiSelect(boolean multiSelect)
           
 void setOnchange(java.lang.String onchange)
           
 void setOptions(int index, java.util.Map<java.lang.String,DirectorySelectItem> opts)
           
 void setQualifiedParentKeys(boolean fullyQualifiedParentKey)
           
 void setSelections(Selection[] sels)
           
 void setSize(java.lang.Integer size)
           
 void validateValue(javax.faces.context.FacesContext context, java.lang.Object newValue)
           
 
Methods inherited from class javax.faces.component.UIInput
addValidator, addValueChangeListener, getConverterMessage, getRequiredMessage, getSubmittedValue, getValidator, getValidatorMessage, getValidators, getValueChangeListener, getValueChangeListeners, isImmediate, isLocalValueSet, isRequired, isValid, processDecodes, processUpdates, processValidators, removeValidator, removeValueChangeListener, resetValue, setConverterMessage, setImmediate, setLocalValueSet, setRequired, setRequiredMessage, setSubmittedValue, setValid, setValidator, setValidatorMessage, setValue, setValueChangeListener, updateModel, validate
 
Methods inherited from class javax.faces.component.UIOutput
getConverter, getLocalValue, getValue, setConverter
 
Methods inherited from class javax.faces.component.UIComponentBase
broadcast, encodeChildren, findComponent, getAttributes, getChildCount, getChildren, getClientId, getFacet, getFacetCount, getFacets, getFacetsAndChildren, getId, getParent, getRendersChildren, getValueBinding, invokeOnComponent, isRendered, isTransient, processRestoreState, processSaveState, queueEvent, restoreAttachedState, saveAttachedState, setId, setParent, setRendered, setRendererType, setTransient, setValueBinding
 
Methods inherited from class javax.faces.component.UIComponent
encodeAll, getContainerClientId, getValueExpression, setValueExpression
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface javax.faces.component.ValueHolder
getConverter, getLocalValue, getValue, setConverter
 

Field Detail

COMPONENT_TYPE

public static final java.lang.String COMPONENT_TYPE
See Also:
Constant Field Values

COMPONENT_FAMILY

public static final java.lang.String COMPONENT_FAMILY
See Also:
Constant Field Values

DEFAULT_KEY_SEPARATOR

public static final java.lang.String DEFAULT_KEY_SEPARATOR
See Also:
Constant Field Values

DEFAULT_PARENT_KEY

public static final java.lang.String DEFAULT_PARENT_KEY
Constructor Detail

ChainSelect

public ChainSelect()
Method Detail

isAllowBranchSelection

public boolean isAllowBranchSelection()

setAllowBranchSelection

public void setAllowBranchSelection(boolean allowBranchSelection)

isAllowRootSelection

public boolean isAllowRootSelection()

setAllowRootSelection

public void setAllowRootSelection(boolean allowRootSelection)

getFamily

public java.lang.String getFamily()
Overrides:
getFamily in class javax.faces.component.UIInput

getRendererType

public java.lang.String getRendererType()
Overrides:
getRendererType in class javax.faces.component.UIComponentBase

restoreState

public void restoreState(javax.faces.context.FacesContext context,
                         java.lang.Object state)
Specified by:
restoreState in interface javax.faces.component.StateHolder
Overrides:
restoreState in class javax.faces.component.UIInput

saveState

public java.lang.Object saveState(javax.faces.context.FacesContext arg0)
Specified by:
saveState in interface javax.faces.component.StateHolder
Overrides:
saveState in class javax.faces.component.UIInput

getSelectionKeyList

public java.util.List<java.lang.String> getSelectionKeyList()

addToSelectionKeyList

public void addToSelectionKeyList(java.lang.String key)

decode

public void decode(javax.faces.context.FacesContext context)
Overrides:
decode in class javax.faces.component.UIInput

format

public static java.lang.String format(java.lang.Object o)

formatAr

public static java.lang.String formatAr(java.lang.String[] ar)

encodeBegin

public void encodeBegin(javax.faces.context.FacesContext context)
                 throws java.io.IOException
Overrides:
encodeBegin in class javax.faces.component.UIComponentBase
Throws:
java.io.IOException

encodeEnd

public void encodeEnd(javax.faces.context.FacesContext context)
               throws java.io.IOException
Overrides:
encodeEnd in class javax.faces.component.UIComponentBase
Throws:
java.io.IOException

getProperty

public java.lang.Object getProperty(java.lang.String name)

getStringProperty

public java.lang.String getStringProperty(java.lang.String name,
                                          java.lang.String defaultValue)

getBooleanProperty

public java.lang.Boolean getBooleanProperty(java.lang.String name,
                                            boolean defaultValue)

getLocalize

public java.lang.Boolean getLocalize()

setLocalize

public void setLocalize(java.lang.Boolean localize)

getCssStyle

public java.lang.String getCssStyle()

setCssStyle

public void setCssStyle(java.lang.String cssStyle)

getCssStyleClass

public java.lang.String getCssStyleClass()

setCSsStyleClass

public void setCSsStyleClass(java.lang.String cssStyleClass)

getOnchange

public java.lang.String getOnchange()

setOnchange

public void setOnchange(java.lang.String onchange)

getSelection

public Selection getSelection(int i)

setSelections

public void setSelections(Selection[] sels)

getSize

public java.lang.Integer getSize()

setSize

public void setSize(java.lang.Integer size)

getOptions

public java.util.Map<java.lang.String,DirectorySelectItem> getOptions(int index)

setOptions

public void setOptions(int index,
                       java.util.Map<java.lang.String,DirectorySelectItem> opts)

rebuildOptions

public void rebuildOptions()
If the user changes selection for position k, all options for n>k will be reset. We only have to rebuild options for position k+1.


getComponent

public ChainSelectListboxComponent getComponent(int i)

isMultiSelect

public boolean isMultiSelect()

setMultiSelect

public void setMultiSelect(boolean multiSelect)

getSelections

public Selection[] getSelections()

isQualifiedParentKeys

public boolean isQualifiedParentKeys()

setQualifiedParentKeys

public void setQualifiedParentKeys(boolean fullyQualifiedParentKey)

getDisplayValueOnly

public java.lang.Boolean getDisplayValueOnly()

setDisplayValueOnly

public void setDisplayValueOnly(java.lang.Boolean displayValueOnly)

getDisplayValueOnlyStyle

public java.lang.String getDisplayValueOnlyStyle()

setDisplayValueOnlyStyle

public void setDisplayValueOnlyStyle(java.lang.String displayValueOnlyStyle)

getDisplayValueOnlyStyleClass

public java.lang.String getDisplayValueOnlyStyleClass()

setDisplayValueOnlyStyleClass

public void setDisplayValueOnlyStyleClass(java.lang.String displayValueOnlyStyleClass)

getMultiParentSelect

public boolean getMultiParentSelect()

setMultiParentSelect

public void setMultiParentSelect(boolean multiParentSelect)

encodeValue

public java.lang.String[] encodeValue(Selection[] selections)

createSelection

public Selection createSelection(java.util.List<java.lang.String> columns)

createSelection

public Selection createSelection(java.lang.String[] columns)

getComponentValue

public Selection[] getComponentValue()

setComponentValue

public void setComponentValue(Selection[] componentValue)

getLastSelectedComponentIndex

public int getLastSelectedComponentIndex()

setLastSelectedComponentIndex

public void setLastSelectedComponentIndex(int index)

setCompAtIndex

public void setCompAtIndex(int index,
                           ChainSelectListboxComponent comp)

getKeySeparator

public java.lang.String getKeySeparator()

setKeySeparator

public void setKeySeparator(java.lang.String keySeparator)

getDefaultRootKey

public java.lang.String getDefaultRootKey()

setDefaultRootKey

public void setDefaultRootKey(java.lang.String defaultRootKey)

validateValue

public void validateValue(javax.faces.context.FacesContext context,
                          java.lang.Object newValue)
Overrides:
validateValue in class javax.faces.component.UIInput

Nuxeo Enterprise Platform 5.4

Copyright © 2010 Nuxeo SAS. All Rights Reserved.