public abstract class BaseAssociationEditor
extends javax.faces.component.UIInput
| Modifier and Type | Class and Description |
|---|---|
static class |
BaseAssociationEditor.AssocEditorEvent
Class representing an action relevant to the AssociationEditor component.
|
| Modifier and Type | Field and Description |
|---|---|
protected Map<String,Object> |
added |
protected String |
associationName |
protected List<org.alfresco.service.cmr.repository.NodeRef> |
availableOptions
List containing the currently available options
|
protected String |
availableOptionsSize |
protected String |
changingAssociation |
protected Boolean |
disabled |
protected boolean |
highlightedRow |
protected String |
noSelectedItemsMsg |
protected Map<String,Object> |
originalAssocs
Map of the original associations keyed by the noderef of the child
|
protected Map<String,Object> |
removed |
protected String |
searchTerm |
protected String |
selectedItemsMsg |
protected String |
selectItemMsg |
protected String |
selectItemsMsg |
protected boolean |
showAvailable |
| Constructor and Description |
|---|
BaseAssociationEditor()
Default constructor
|
| Modifier and Type | Method and Description |
|---|---|
protected abstract void |
addTarget(Node node,
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 String |
generateFormSubmit(javax.faces.context.FacesContext context,
String action)
Generate FORM submit JavaScript for the specified action
|
protected org.alfresco.service.cmr.dictionary.AssociationDefinition |
getAssociationDefinition(javax.faces.context.FacesContext context)
Retrieves the AssociationDefinition for the association we are representing
|
String |
getAssociationName()
Returns the name of the association this component is editing
|
protected void |
getAvailableOptions(javax.faces.context.FacesContext context,
String contains)
Retrieves the available options for the current association
|
String |
getAvailableOptionsSize()
Returns the size of the select control
|
protected String |
getHiddenFieldName()
We use a hidden field per picker instance on the page.
|
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'.
|
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'.
|
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'.
|
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,
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,
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,
Object state) |
Object |
saveState(javax.faces.context.FacesContext context) |
void |
setAssociationName(String associationName)
Sets the name of the association this component will edit
|
void |
setAvailableOptionsSize(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(String noSelectedItemsMsg)
Sets the no selected items message to display in the UI
|
void |
setSelectedItemsMsg(String selectedItemsMsg)
Sets the selected items message to display in the UI
|
void |
setSelectItemMsg(String selectItemMsg)
Sets the select an item message to display in the UI
|
void |
setSelectItemsMsg(String selectItemsMsg)
Sets the select items message to display in the UI
|
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, validateValuegetConverter, getLocalValue, setConverteraddFacesListener, 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, setValueBindingprotected String associationName
protected String availableOptionsSize
protected String selectItemMsg
protected String selectItemsMsg
protected String selectedItemsMsg
protected String noSelectedItemsMsg
protected String searchTerm
protected Boolean disabled
protected boolean showAvailable
protected Map<String,Object> originalAssocs
protected List<org.alfresco.service.cmr.repository.NodeRef> availableOptions
protected String changingAssociation
protected boolean highlightedRow
public void restoreState(javax.faces.context.FacesContext context,
Object state)
restoreState in interface javax.faces.component.StateHolderrestoreState in class javax.faces.component.UIInputStateHolder.restoreState(javax.faces.context.FacesContext, java.lang.Object)public Object saveState(javax.faces.context.FacesContext context)
saveState in interface javax.faces.component.StateHoldersaveState in class javax.faces.component.UIInputStateHolder.saveState(javax.faces.context.FacesContext)public void decode(javax.faces.context.FacesContext context)
decode in class javax.faces.component.UIInputUIComponent.decode(javax.faces.context.FacesContext)public void broadcast(javax.faces.event.FacesEvent event)
throws javax.faces.event.AbortProcessingException
broadcast in class javax.faces.component.UIInputjavax.faces.event.AbortProcessingExceptionUIComponent.broadcast(javax.faces.event.FacesEvent)public void encodeBegin(javax.faces.context.FacesContext context)
throws IOException
encodeBegin in class javax.faces.component.UIComponentBaseIOExceptionUIComponent.encodeBegin(javax.faces.context.FacesContext)public String getAssociationName()
public void setAssociationName(String associationName)
associationName - Name of the association to editpublic boolean isDisabled()
public void setDisabled(boolean disabled)
disabled - true to disable the componentpublic String getAvailableOptionsSize()
public void setAvailableOptionsSize(String availableOptionsSize)
availableOptionsSize - The sizepublic String getNoSelectedItemsMsg()
public void setNoSelectedItemsMsg(String noSelectedItemsMsg)
noSelectedItemsMsg - The messagepublic String getSelectedItemsMsg()
public void setSelectedItemsMsg(String selectedItemsMsg)
selectedItemsMsg - The messagepublic String getSelectItemMsg()
public void setSelectItemMsg(String selectItemMsg)
selectItemMsg - The messagepublic String getSelectItemsMsg()
public void setSelectItemsMsg(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 IOException
context - FacesContextout - ResponseWriternodeService - The NodeServiceIOExceptionprotected abstract void renderExistingAssociations(javax.faces.context.FacesContext context,
javax.faces.context.ResponseWriter out,
org.alfresco.service.cmr.repository.NodeService nodeService,
boolean allowMany)
throws IOException
context - FacesContextout - ResponseWriternodeService - The NodeServiceallowMany - Whether multiple associations are allowedIOExceptionprotected abstract void removeTarget(Node node, String targetRef)
node - The node we are dealing withtargetRef - The noderef of the child to removeprotected abstract void addTarget(Node node, 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 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 childrenIOExceptionprotected void renderSearchField(javax.faces.context.FacesContext context,
javax.faces.context.ResponseWriter out)
throws IOException
context - Faces Contextout - The Response WriterIOExceptionprotected void renderNone(javax.faces.context.FacesContext context,
javax.faces.context.ResponseWriter out)
throws IOException
context - Faces Contextout - Response WriterIOExceptionprotected void renderAvailableOptions(javax.faces.context.FacesContext context,
javax.faces.context.ResponseWriter out,
org.alfresco.service.cmr.repository.NodeService nodeService,
String targetType,
boolean allowMany)
throws 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 childrenIOExceptionprotected org.alfresco.service.cmr.dictionary.AssociationDefinition getAssociationDefinition(javax.faces.context.FacesContext context)
context - Faces Contextprotected void getAvailableOptions(javax.faces.context.FacesContext context,
String contains)
context - Faces Contextcontains - The contains part of the queryprotected String getHiddenFieldName()
Copyright © 2005–2018 Alfresco Software. All rights reserved.