org.alfresco.web.ui.repo.component
Class UIContentSelector

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.alfresco.web.ui.repo.component.UIContentSelector
All Implemented Interfaces:
javax.faces.component.EditableValueHolder, javax.faces.component.StateHolder, javax.faces.component.ValueHolder

public class UIContentSelector
extends javax.faces.component.UIInput

Component for selecting content from the repository


Field Summary
protected  java.util.List availableOptions
          List containing the currently available options
protected  java.lang.String availableOptionsSize
           
protected  java.lang.Boolean disabled
           
 
Fields inherited from class javax.faces.component.UIInput
COMPONENT_FAMILY, COMPONENT_TYPE, CONVERSION_MESSAGE_ID, REQUIRED_MESSAGE_ID
 
Constructor Summary
UIContentSelector()
          Default constructor
 
Method Summary
 void decode(javax.faces.context.FacesContext context)
           
 void encodeBegin(javax.faces.context.FacesContext context)
           
protected  void getAvailableOptions(javax.faces.context.FacesContext context, java.lang.String contains)
          Retrieves the available options for the current association
 java.lang.String getAvailableOptionsSize()
          Returns the size of the select control when multiple items can be selected
 java.lang.String getFamily()
           
 boolean getMultiSelect()
           
 boolean isDisabled()
          Determines whether the component should be rendered in a disabled state
protected  void renderAvailableOptions(javax.faces.context.FacesContext context, javax.faces.context.ResponseWriter out, org.alfresco.service.cmr.repository.NodeService nodeService)
          Renders the list of available options
 void restoreState(javax.faces.context.FacesContext context, java.lang.Object state)
           
 java.lang.Object saveState(javax.faces.context.FacesContext context)
           
 void setAvailableOptionsSize(java.lang.String availableOptionsSize)
          Sets the size of the select control used when multiple items can be selected
 void setDisabled(boolean disabled)
          Determines whether the component should be rendered in a disabled state
 void setMultiSelect(boolean multiSelect)
           
 
Methods inherited from class javax.faces.component.UIInput
addValidator, addValueChangeListener, broadcast, 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
 
Methods inherited from class javax.faces.component.UIOutput
getConverter, getLocalValue, setConverter
 
Methods inherited from class javax.faces.component.UIComponentBase
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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface javax.faces.component.ValueHolder
getConverter, getLocalValue, setConverter
 

Field Detail

availableOptionsSize

protected java.lang.String availableOptionsSize

disabled

protected java.lang.Boolean disabled

availableOptions

protected java.util.List availableOptions
List containing the currently available options

Constructor Detail

UIContentSelector

public UIContentSelector()
Default constructor

Method Detail

getFamily

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

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
See Also:
StateHolder.restoreState(javax.faces.context.FacesContext, java.lang.Object)

saveState

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

decode

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

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
See Also:
UIComponent.encodeBegin(javax.faces.context.FacesContext)

isDisabled

public boolean isDisabled()
Determines whether the component should be rendered in a disabled state

Returns:
Returns whether the component is disabled

setDisabled

public void setDisabled(boolean disabled)
Determines whether the component should be rendered in a disabled state

Parameters:
disabled - true to disable the component

getAvailableOptionsSize

public java.lang.String getAvailableOptionsSize()
Returns the size of the select control when multiple items can be selected

Returns:
The size of the select control

setAvailableOptionsSize

public void setAvailableOptionsSize(java.lang.String availableOptionsSize)
Sets the size of the select control used when multiple items can be selected

Parameters:
availableOptionsSize - The size

getMultiSelect

public boolean getMultiSelect()
Returns:
true if multi select should be enabled.

setMultiSelect

public void setMultiSelect(boolean multiSelect)
Parameters:
multiSelect - Flag to determine whether multi select is enabled

renderAvailableOptions

protected void renderAvailableOptions(javax.faces.context.FacesContext context,
                                      javax.faces.context.ResponseWriter out,
                                      org.alfresco.service.cmr.repository.NodeService nodeService)
                               throws java.io.IOException
Renders the list of available options

Parameters:
context - FacesContext
out - Writer to write output to
nodeService - The NodeService
Throws:
java.io.IOException

getAvailableOptions

protected void getAvailableOptions(javax.faces.context.FacesContext context,
                                   java.lang.String contains)
Retrieves the available options for the current association

Parameters:
context - Faces Context
contains - The contains part of the query


Copyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.