public abstract class AbstractItemSelector extends UIInput
Modifier and Type | Class and Description |
---|---|
static class |
AbstractItemSelector.ItemSelectorEvent
Class representing the clicking of a breadcrumb element.
|
Modifier and Type | Field and Description |
---|---|
protected String |
avmStore
current AVM store being browsed
|
protected Boolean |
disabled
Flag to show whether the component is disabled
|
protected String |
initialSelectionId
id of the initially selected item, if value is not set
|
protected String |
label
label to be displayed before a space is selected
|
protected int |
mode
what mode the component is in
|
protected static int |
MODE_BEFORE_SELECTION |
protected static int |
MODE_CANCEL_SELECTION |
protected static int |
MODE_CONFIRM_SELECTION |
protected static int |
MODE_DRILLDOWN_SELECTION |
protected static int |
MODE_INITIAL_SELECTION |
protected String |
navigationId
currently browsing node id
|
protected static String |
OPTION |
protected Integer |
spacing
cellspacing between options
|
COMPONENT_FAMILY, COMPONENT_TYPE, CONVERSION_MESSAGE_ID, REQUIRED_MESSAGE_ID
Constructor and Description |
---|
AbstractItemSelector()
Default constructor
|
Modifier and Type | Method and Description |
---|---|
void |
broadcast(FacesEvent event) |
void |
decode(FacesContext context) |
void |
encodeBegin(FacesContext context) |
protected String |
encodeFieldValues(int mode,
String id) |
abstract Collection<org.alfresco.service.cmr.repository.NodeRef> |
getChildrenForNode(FacesContext context)
Returns a collection of child associations for the current navigation node
|
abstract String |
getDefaultLabel()
Retrieves the default label to show if none has been defined and nothing has been selected
|
protected static org.alfresco.service.cmr.dictionary.DictionaryService |
getDictionaryService(FacesContext context)
Use Spring JSF integration to return the Dictionary Service bean instance
|
abstract String |
getFamily() |
protected static org.alfresco.service.cmr.repository.NodeService |
getFastNodeService(FacesContext context)
Use Spring JSF integration to return the node Service bean instance
|
protected String |
getHiddenFieldName()
We use a unique hidden field name based on our client Id.
|
String |
getInitialSelection() |
abstract String |
getItemIcon(FacesContext context,
org.alfresco.service.cmr.repository.NodeRef ref) |
String |
getLabel() |
protected static org.alfresco.service.cmr.repository.NodeService |
getNodeService(FacesContext context)
Use Spring JSF integration to return the Node Service bean instance
|
abstract String |
getParentNodeId(FacesContext context)
Retrieves the id of the parent node of the current navigation node
|
abstract Collection<org.alfresco.service.cmr.repository.NodeRef> |
getRootChildren(FacesContext context)
Returns a collection of child associations of the root
|
Integer |
getSpacing() |
boolean |
isDisabled()
Determines whether the component should be rendered in a disabled state
|
protected String |
renderNodeLink(FacesContext context,
String id,
String name,
String prefix,
StringBuilder buf)
Render a node descendant as a clickable link
|
void |
restoreState(FacesContext context,
Object state) |
Object |
saveState(FacesContext context) |
void |
setDisabled(boolean disabled)
Determines whether the component should be rendered in a disabled state
|
void |
setInitialSelection(String initialSelection) |
void |
setLabel(String label) |
void |
setSpacing(Integer spacing) |
addValidator, addValueChangeListener, compareValues, getConvertedValue, getSubmittedValue, getValidator, getValidators, getValue, getValueChangeListener, getValueChangeListeners, isImmediate, isLocalValueSet, isRequired, isValid, processDecodes, processUpdates, processValidators, removeValidator, removeValueChangeListener, setImmediate, setLocalValueSet, setRequired, setSubmittedValue, setValid, setValidator, setValue, setValueChangeListener, updateModel, validate, validateValue
getConverter, getLocalValue, setConverter
addFacesListener, encodeChildren, encodeEnd, findComponent, getAttributes, getChildCount, getChildren, getClientId, getFacesContext, getFacesListeners, getFacet, getFacets, getFacetsAndChildren, getId, getParent, getRenderer, getRendererType, getRendersChildren, getValueBinding, isRendered, isTransient, processRestoreState, processSaveState, queueEvent, removeFacesListener, restoreAttachedState, saveAttachedState, setId, setParent, setRendered, setRendererType, setTransient, setValueBinding
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getConverter, getLocalValue, setConverter
protected static final String OPTION
protected static final int MODE_BEFORE_SELECTION
protected static final int MODE_INITIAL_SELECTION
protected static final int MODE_DRILLDOWN_SELECTION
protected static final int MODE_CONFIRM_SELECTION
protected static final int MODE_CANCEL_SELECTION
protected String label
protected Integer spacing
protected int mode
protected String navigationId
protected String avmStore
protected String initialSelectionId
protected Boolean disabled
public abstract String getFamily()
getFamily
in class UIInput
UIComponent.getFamily()
public abstract String getDefaultLabel()
public abstract String getParentNodeId(FacesContext context)
context
- The Faces contextpublic abstract Collection<org.alfresco.service.cmr.repository.NodeRef> getChildrenForNode(FacesContext context)
context
- The Faces contextpublic abstract Collection<org.alfresco.service.cmr.repository.NodeRef> getRootChildren(FacesContext context)
context
- The Faces contextpublic abstract String getItemIcon(FacesContext context, org.alfresco.service.cmr.repository.NodeRef ref)
ref
- NodeRef to the item to get the icon forpublic void restoreState(FacesContext context, Object state)
restoreState
in interface StateHolder
restoreState
in class UIInput
StateHolder.restoreState(javax.faces.context.FacesContext, java.lang.Object)
public Object saveState(FacesContext context)
saveState
in interface StateHolder
saveState
in class UIInput
StateHolder.saveState(javax.faces.context.FacesContext)
public void decode(FacesContext context)
decode
in class UIInput
UIComponentBase.decode(javax.faces.context.FacesContext)
public void broadcast(FacesEvent event) throws AbortProcessingException
broadcast
in class UIInput
AbortProcessingException
UIInput.broadcast(javax.faces.event.FacesEvent)
public void encodeBegin(FacesContext context) throws IOException
encodeBegin
in class UIComponentBase
IOException
UIComponentBase.encodeBegin(javax.faces.context.FacesContext)
public String getLabel()
public void setLabel(String label)
label
- The label to set.public Integer getSpacing()
public void setSpacing(Integer spacing)
spacing
- The spacing to set.public String getInitialSelection()
public void setInitialSelection(String initialSelection)
initialSelection
- The initial selection to set.public boolean isDisabled()
public void setDisabled(boolean disabled)
disabled
- true to disable the componentprotected String getHiddenFieldName()
protected String renderNodeLink(FacesContext context, String id, String name, String prefix, StringBuilder buf)
context
- FacesContextid
- The idname
- The nameprefix
- The prefixbuf
- String bufferprotected static org.alfresco.service.cmr.repository.NodeService getNodeService(FacesContext context)
context
- FacesContextprotected static org.alfresco.service.cmr.repository.NodeService getFastNodeService(FacesContext context)
context
- FacesContextprotected static org.alfresco.service.cmr.dictionary.DictionaryService getDictionaryService(FacesContext context)
context
- FacesContextCopyright © 2005–2017 Alfresco Software. All rights reserved.