org.alfresco.web.ui.repo.component.property
Class UIChildAssociationEditor

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.property.BaseAssociationEditor
                      extended by org.alfresco.web.ui.repo.component.property.UIChildAssociationEditor
All Implemented Interfaces:
javax.faces.component.EditableValueHolder, javax.faces.component.StateHolder, javax.faces.component.ValueHolder

public class UIChildAssociationEditor
extends BaseAssociationEditor

Component that allows child associations to be edited i.e. new associations to be added, existing ones to be removed whilst following the rules in the data dictionary


Nested Class Summary
 
Nested classes/interfaces inherited from class org.alfresco.web.ui.repo.component.property.BaseAssociationEditor
BaseAssociationEditor.AssocEditorEvent
 
Field Summary
 
Fields inherited from class org.alfresco.web.ui.repo.component.property.BaseAssociationEditor
added, associationName, availableOptions, availableOptionsSize, changingAssociation, disabled, highlightedRow, noSelectedItemsMsg, originalAssocs, removed, searchTerm, selectedItemsMsg, selectItemMsg, selectItemsMsg, showAvailable
 
Fields inherited from class javax.faces.component.UIInput
COMPONENT_FAMILY, COMPONENT_TYPE, CONVERSION_MESSAGE_ID, REQUIRED_MESSAGE_ID
 
Constructor Summary
UIChildAssociationEditor()
           
 
Method Summary
protected  void addTarget(Node node, java.lang.String[] toAdd)
          Updates the component and node state to reflect an association being added
 java.lang.String getFamily()
           
protected  void populateAssocationMaps(Node node, org.alfresco.service.cmr.repository.NodeService nodeService)
          Populates all the internal Maps with the appropriate association reference objects
protected  void removeTarget(Node node, java.lang.String childRef)
          Updates the component and node state to reflect an association being removed
protected  void renderExistingAssociations(javax.faces.context.FacesContext context, javax.faces.context.ResponseWriter out, org.alfresco.service.cmr.repository.NodeService nodeService, boolean allowMany)
          Renders the existing associations in an editable form
protected  void renderReadOnlyAssociations(javax.faces.context.FacesContext context, javax.faces.context.ResponseWriter out, org.alfresco.service.cmr.repository.NodeService nodeService)
          Renders the existing associations in a read-only form
 
Methods inherited from class org.alfresco.web.ui.repo.component.property.BaseAssociationEditor
broadcast, decode, encodeBegin, getAssociationDefinition, getAssociationName, getAvailableOptions, getAvailableOptionsSize, getNoSelectedItemsMsg, getSelectedItemsMsg, getSelectItemMsg, getSelectItemsMsg, isDisabled, renderAvailableOptions, renderExistingAssociation, renderNone, renderSearchField, restoreState, saveState, setAssociationName, setAvailableOptionsSize, setDisabled, setNoSelectedItemsMsg, setSelectedItemsMsg, setSelectItemMsg, setSelectItemsMsg
 
Methods inherited from class javax.faces.component.UIInput
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
 
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
 

Constructor Detail

UIChildAssociationEditor

public UIChildAssociationEditor()
Method Detail

getFamily

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

populateAssocationMaps

protected void populateAssocationMaps(Node node,
                                      org.alfresco.service.cmr.repository.NodeService nodeService)
Description copied from class: BaseAssociationEditor
Populates all the internal Maps with the appropriate association reference objects

Specified by:
populateAssocationMaps in class BaseAssociationEditor
Parameters:
node - The Node we are dealing with
nodeService - The NodeService
See Also:
BaseAssociationEditor.populateAssocationMaps(org.alfresco.web.bean.repository.Node, org.alfresco.service.cmr.repository.NodeService)

renderExistingAssociations

protected void renderExistingAssociations(javax.faces.context.FacesContext context,
                                          javax.faces.context.ResponseWriter out,
                                          org.alfresco.service.cmr.repository.NodeService nodeService,
                                          boolean allowMany)
                                   throws java.io.IOException
Description copied from class: BaseAssociationEditor
Renders the existing associations in an editable form

Specified by:
renderExistingAssociations in class BaseAssociationEditor
Parameters:
context - FacesContext
out - ResponseWriter
nodeService - The NodeService
allowMany - Whether multiple associations are allowed
Throws:
java.io.IOException
See Also:
BaseAssociationEditor.renderExistingAssociations(javax.faces.context.FacesContext, javax.faces.context.ResponseWriter, org.alfresco.service.cmr.repository.NodeService, boolean)

renderReadOnlyAssociations

protected void renderReadOnlyAssociations(javax.faces.context.FacesContext context,
                                          javax.faces.context.ResponseWriter out,
                                          org.alfresco.service.cmr.repository.NodeService nodeService)
                                   throws java.io.IOException
Description copied from class: BaseAssociationEditor
Renders the existing associations in a read-only form

Specified by:
renderReadOnlyAssociations in class BaseAssociationEditor
Parameters:
context - FacesContext
out - ResponseWriter
nodeService - The NodeService
Throws:
java.io.IOException
See Also:
BaseAssociationEditor.renderReadOnlyAssociations(javax.faces.context.FacesContext, javax.faces.context.ResponseWriter, org.alfresco.service.cmr.repository.NodeService)

removeTarget

protected void removeTarget(Node node,
                            java.lang.String childRef)
Description copied from class: BaseAssociationEditor
Updates the component and node state to reflect an association being removed

Specified by:
removeTarget in class BaseAssociationEditor
Parameters:
node - The node we are dealing with
childRef - The noderef of the child to remove
See Also:
BaseAssociationEditor.removeTarget(org.alfresco.web.bean.repository.Node, java.lang.String)

addTarget

protected void addTarget(Node node,
                         java.lang.String[] toAdd)
Description copied from class: BaseAssociationEditor
Updates the component and node state to reflect an association being added

Specified by:
addTarget in class BaseAssociationEditor
Parameters:
node - The node we are dealing with
toAdd - The noderefs of the children to add
See Also:
BaseAssociationEditor.addTarget(org.alfresco.web.bean.repository.Node, java.lang.String[])


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