|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.faces.component.UIComponent
javax.faces.component.UIComponentBase
javax.faces.component.UIOutput
javax.faces.component.UIInput
org.alfresco.web.ui.repo.component.property.BaseAssociationEditor
public abstract class BaseAssociationEditor
Base class for all association editor components
Nested Class Summary | |
---|---|
static class |
BaseAssociationEditor.AssocEditorEvent
Class representing an action relevant to the AssociationEditor component. |
Field Summary | |
---|---|
protected java.util.Map |
added
|
protected java.lang.String |
associationName
|
protected java.util.List |
availableOptions
List containing the currently available options |
protected java.lang.String |
availableOptionsSize
|
protected java.lang.String |
changingAssociation
|
protected java.lang.Boolean |
disabled
|
protected boolean |
highlightedRow
|
protected java.lang.String |
noSelectedItemsMsg
|
protected java.util.Map |
originalAssocs
Map of the original associations keyed by the noderef of the child |
protected java.util.Map |
removed
|
protected java.lang.String |
searchTerm
|
protected java.lang.String |
selectedItemsMsg
|
protected java.lang.String |
selectItemMsg
|
protected java.lang.String |
selectItemsMsg
|
protected boolean |
showAvailable
|
Fields inherited from class javax.faces.component.UIInput |
---|
COMPONENT_FAMILY, COMPONENT_TYPE, CONVERSION_MESSAGE_ID, REQUIRED_MESSAGE_ID |
Constructor Summary | |
---|---|
BaseAssociationEditor()
Default constructor |
Method Summary | |
---|---|
protected abstract void |
addTarget(Node node,
java.lang.String[] toAdd)
Updates the component and node state to reflect an association being added |
void |
broadcast(javax.faces.event.FacesEvent event)
|
void |
decode(javax.faces.context.FacesContext context)
|
void |
encodeBegin(javax.faces.context.FacesContext context)
|
protected org.alfresco.service.cmr.dictionary.AssociationDefinition |
getAssociationDefinition(javax.faces.context.FacesContext context)
Retrieves the AssociationDefinition for the association we are representing |
java.lang.String |
getAssociationName()
Returns the name of the association this component is editing |
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 |
java.lang.String |
getNoSelectedItemsMsg()
Returns the message to display when no items have been selected, if one hasn't been set it defaults to the message in the bundle under key 'no_selected_items'. |
java.lang.String |
getSelectedItemsMsg()
Returns the message to display for the selected items, if one hasn't been set it defaults to the message in the bundle under key 'selected_items'. |
java.lang.String |
getSelectItemMsg()
Returns the message to display for select an item, if one hasn't been set it defaults to the message in the bundle under key 'search_select_item'. |
java.lang.String |
getSelectItemsMsg()
Returns the message to display for select items, if one hasn't been set it defaults to the message in the bundle under key 'search_select_items'. |
boolean |
isDisabled()
Determines whether the component should be rendered in a disabled state |
protected abstract void |
populateAssocationMaps(Node node,
org.alfresco.service.cmr.repository.NodeService nodeService)
Populates all the internal Maps with the appropriate association reference objects |
protected abstract void |
removeTarget(Node node,
java.lang.String targetRef)
Updates the component and node state to reflect an association being removed |
protected void |
renderAvailableOptions(javax.faces.context.FacesContext context,
javax.faces.context.ResponseWriter out,
org.alfresco.service.cmr.repository.NodeService nodeService,
java.lang.String targetType,
boolean allowMany)
Renders the list of available options for a new association |
protected void |
renderExistingAssociation(javax.faces.context.FacesContext context,
javax.faces.context.ResponseWriter out,
org.alfresco.service.cmr.repository.NodeService nodeService,
org.alfresco.service.cmr.repository.NodeRef targetRef,
boolean allowMany)
Renders an existing association with the appropriate options |
protected abstract 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 |
renderNone(javax.faces.context.FacesContext context,
javax.faces.context.ResponseWriter out)
Renders the |
protected abstract 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 |
protected void |
renderSearchField(javax.faces.context.FacesContext context,
javax.faces.context.ResponseWriter out)
Renders the search fields |
void |
restoreState(javax.faces.context.FacesContext context,
java.lang.Object state)
|
java.lang.Object |
saveState(javax.faces.context.FacesContext context)
|
void |
setAssociationName(java.lang.String associationName)
Sets the name of the association this component will edit |
void |
setAvailableOptionsSize(java.lang.String availableOptionsSize)
Sets the size of the select control |
void |
setDisabled(boolean disabled)
Determines whether the component should be rendered in a disabled state |
void |
setNoSelectedItemsMsg(java.lang.String noSelectedItemsMsg)
Sets the no selected items message to display in the UI |
void |
setSelectedItemsMsg(java.lang.String selectedItemsMsg)
Sets the selected items message to display in the UI |
void |
setSelectItemMsg(java.lang.String selectItemMsg)
Sets the select an item message to display in the UI |
void |
setSelectItemsMsg(java.lang.String selectItemsMsg)
Sets the select items message to display in the UI |
Methods inherited from class javax.faces.component.UIInput |
---|
addValidator, addValueChangeListener, compareValues, getConvertedValue, getFamily, 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 |
---|
protected java.lang.String associationName
protected java.lang.String availableOptionsSize
protected java.lang.String selectItemMsg
protected java.lang.String selectItemsMsg
protected java.lang.String selectedItemsMsg
protected java.lang.String noSelectedItemsMsg
protected java.lang.String searchTerm
protected java.lang.Boolean disabled
protected boolean showAvailable
protected java.util.Map originalAssocs
protected java.util.Map added
protected java.util.Map removed
protected java.util.List availableOptions
protected java.lang.String changingAssociation
protected boolean highlightedRow
Constructor Detail |
---|
public BaseAssociationEditor()
Method Detail |
---|
public void restoreState(javax.faces.context.FacesContext context, java.lang.Object state)
restoreState
in interface javax.faces.component.StateHolder
restoreState
in class javax.faces.component.UIInput
StateHolder.restoreState(javax.faces.context.FacesContext, java.lang.Object)
public java.lang.Object saveState(javax.faces.context.FacesContext context)
saveState
in interface javax.faces.component.StateHolder
saveState
in class javax.faces.component.UIInput
StateHolder.saveState(javax.faces.context.FacesContext)
public void decode(javax.faces.context.FacesContext context)
decode
in class javax.faces.component.UIInput
UIComponent.decode(javax.faces.context.FacesContext)
public void broadcast(javax.faces.event.FacesEvent event) throws javax.faces.event.AbortProcessingException
broadcast
in class javax.faces.component.UIInput
javax.faces.event.AbortProcessingException
UIComponent.broadcast(javax.faces.event.FacesEvent)
public void encodeBegin(javax.faces.context.FacesContext context) throws java.io.IOException
encodeBegin
in class javax.faces.component.UIComponentBase
java.io.IOException
UIComponent.encodeBegin(javax.faces.context.FacesContext)
public java.lang.String getAssociationName()
public void setAssociationName(java.lang.String associationName)
associationName
- Name of the association to editpublic boolean isDisabled()
public void setDisabled(boolean disabled)
disabled
- true to disable the componentpublic java.lang.String getAvailableOptionsSize()
public void setAvailableOptionsSize(java.lang.String availableOptionsSize)
availableOptionsSize
- The sizepublic java.lang.String getNoSelectedItemsMsg()
public void setNoSelectedItemsMsg(java.lang.String noSelectedItemsMsg)
noSelectedItemsMsg
- The messagepublic java.lang.String getSelectedItemsMsg()
public void setSelectedItemsMsg(java.lang.String selectedItemsMsg)
selectedItemsMsg
- The messagepublic java.lang.String getSelectItemMsg()
public void setSelectItemMsg(java.lang.String selectItemMsg)
selectItemMsg
- The messagepublic java.lang.String getSelectItemsMsg()
public void setSelectItemsMsg(java.lang.String selectItemsMsg)
selectItemsMsg
- The messageprotected abstract void populateAssocationMaps(Node node, org.alfresco.service.cmr.repository.NodeService nodeService)
node
- The Node we are dealing withnodeService
- The NodeServiceprotected abstract void renderReadOnlyAssociations(javax.faces.context.FacesContext context, javax.faces.context.ResponseWriter out, org.alfresco.service.cmr.repository.NodeService nodeService) throws java.io.IOException
context
- FacesContextout
- ResponseWriternodeService
- The NodeService
java.io.IOException
protected abstract 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
context
- FacesContextout
- ResponseWriternodeService
- The NodeServiceallowMany
- Whether multiple associations are allowed
java.io.IOException
protected abstract void removeTarget(Node node, java.lang.String targetRef)
node
- The node we are dealing withtargetRef
- The noderef of the child to removeprotected abstract void addTarget(Node node, java.lang.String[] toAdd)
node
- The node we are dealing withtoAdd
- The noderefs of the children to addprotected void renderExistingAssociation(javax.faces.context.FacesContext context, javax.faces.context.ResponseWriter out, org.alfresco.service.cmr.repository.NodeService nodeService, org.alfresco.service.cmr.repository.NodeRef targetRef, boolean allowMany) throws java.io.IOException
context
- FacesContextout
- Writer to write output tonodeService
- The NodeServicetargetRef
- The node at the end of the association being renderedallowMany
- Whether the current association allows multiple children
java.io.IOException
protected void renderSearchField(javax.faces.context.FacesContext context, javax.faces.context.ResponseWriter out) throws java.io.IOException
context
- Faces Contextout
- The Response Writer
java.io.IOException
protected void renderNone(javax.faces.context.FacesContext context, javax.faces.context.ResponseWriter out) throws java.io.IOException
context
- Faces Contextout
- Response Writer
java.io.IOException
protected void renderAvailableOptions(javax.faces.context.FacesContext context, javax.faces.context.ResponseWriter out, org.alfresco.service.cmr.repository.NodeService nodeService, java.lang.String targetType, boolean allowMany) throws java.io.IOException
context
- FacesContextout
- Writer to write output tonodeService
- The NodeServicetargetType
- The type of the child at the end of the associationallowMany
- Whether the current association allows multiple children
java.io.IOException
protected org.alfresco.service.cmr.dictionary.AssociationDefinition getAssociationDefinition(javax.faces.context.FacesContext context)
context
- Faces Context
protected void getAvailableOptions(javax.faces.context.FacesContext context, java.lang.String contains)
context
- Faces Contextcontains
- The contains part of the query
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |