|
Nuxeo ECM Projects 5.4.3-SNAPSHOT | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object javax.faces.component.UIComponent javax.faces.component.UIComponentBase javax.faces.component.UIOutput javax.faces.component.UIInput org.nuxeo.ecm.platform.ui.web.component.list.UIEditableList
public class UIEditableList
Editable table component.
Allows to add/remove elements from an UIEditableList
, inspired from
Trinidad UIXCollection component.
Field Summary | |
---|---|
static String |
COMPONENT_FAMILY
|
static String |
COMPONENT_TYPE
|
Fields inherited from class javax.faces.component.UIInput |
---|
CONVERSION_MESSAGE_ID, REQUIRED_MESSAGE_ID, UPDATE_MESSAGE_ID |
Fields inherited from interface javax.faces.component.NamingContainer |
---|
SEPARATOR_CHAR |
Constructor Summary | |
---|---|
UIEditableList()
|
Method Summary | |
---|---|
boolean |
addValue(Object value)
Adds a value to the end of the editable model. |
void |
broadcast(FacesEvent event)
Delivers a wrapped event to the appropriate component. |
void |
encodeBegin(FacesContext context)
|
void |
encodeChildren(FacesContext context)
Repeatedly render the children as many times as needed. |
void |
encodeEnd(FacesContext context)
|
String |
getContainerClientId(FacesContext context)
Override container client id resolution to handle recursion. |
Object |
getDefaultValue()
|
Boolean |
getDiff()
Gets boolean stating if diff must be used when saving the value submitted. |
EditableModel |
getEditableModel()
Gets the EditableModel to use with this component. |
String |
getFamily()
|
String |
getModel()
Gets model name exposed in request map. |
Integer |
getNumber()
|
Boolean |
getRemoveEmpty()
|
String |
getRendererType()
|
boolean |
getRendersChildren()
|
int |
getRowCount()
Gets the total number of rows in this table. |
Object |
getRowData()
Gets the data for the current row. |
int |
getRowIndex()
Gets the index of the current row. |
Integer |
getRowKey()
Gets the rowKey of the current row. |
Object |
getTemplate()
Gets template to be used when adding new values to the model. |
Object |
getValue()
|
void |
insertValue(int index,
Object value)
Inserts value at given index on the editable model. |
boolean |
invokeOnComponent(FacesContext context,
String clientId,
ContextCallback callback)
|
boolean |
isRowAvailable()
Checks to see if the current row is available. |
boolean |
isRowModified()
Checks to see if the current row is modified. |
Object |
moveValue(int fromIndex,
int toIndex)
Modifies value at given index on the editable model. |
void |
processDecodes(FacesContext context)
|
void |
processUpdates(FacesContext context)
|
void |
processValidators(FacesContext context)
|
void |
queueEvent(FacesEvent event)
Queues an event. |
void |
recordValueModified(int index,
Object newValue)
Records a value modification. |
Object |
removeValue(int index)
Removes value at given index on the editable model. |
void |
resetCachedModel()
Resets the cache model |
void |
restoreState(FacesContext context,
Object state)
|
Object |
saveState(FacesContext context)
|
void |
setDefaultValue(Object defaultValue)
|
void |
setDiff(Boolean diff)
Sets boolean stating if diff must be used when saving the value submitted. |
void |
setModel(String model)
Sets model name exposed in request map. |
void |
setNumber(Integer number)
|
void |
setRemoveEmpty(Boolean removeEmpty)
|
void |
setRendererType(String rendererType)
|
void |
setRowIndex(int rowIndex)
Makes a row current. |
void |
setRowKey(Integer rowKey)
Makes a row current. |
void |
setTemplate(Object template)
Sets template to be used when adding new values to the model. |
Methods inherited from class javax.faces.component.UIOutput |
---|
getConverter, getLocalValue, setConverter |
Methods inherited from class javax.faces.component.UIComponentBase |
---|
findComponent, getAttributes, getChildCount, getChildren, getClientId, getFacet, getFacetCount, getFacets, getFacetsAndChildren, getId, getParent, getValueBinding, isRendered, isTransient, processRestoreState, processSaveState, restoreAttachedState, saveAttachedState, setId, setParent, setRendered, setTransient, setValueBinding |
Methods inherited from class javax.faces.component.UIComponent |
---|
encodeAll, getValueExpression, setValueExpression |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface javax.faces.component.ValueHolder |
---|
getConverter, getLocalValue, setConverter |
Field Detail |
---|
public static final String COMPONENT_TYPE
public static final String COMPONENT_FAMILY
Constructor Detail |
---|
public UIEditableList()
Method Detail |
---|
public String getFamily()
getFamily
in class UIInput
public Object saveState(FacesContext context)
saveState
in interface StateHolder
saveState
in class UIInput
public Object getValue()
getValue
in interface ValueHolder
getValue
in class UIOutput
public Object getDefaultValue()
public void setDefaultValue(Object defaultValue)
public void restoreState(FacesContext context, Object state)
restoreState
in interface StateHolder
restoreState
in class UIInput
public void resetCachedModel()
Can be useful when re-rendering a list with ajax and not wanting to keep cached values already submitted.
public final EditableModel getEditableModel()
public final boolean isRowAvailable()
EditableModel.isRowAvailable()
public final boolean isRowModified()
EditableModel.isRowModified()
public final int getRowCount()
EditableModel.getRowCount()
public final int getRowIndex()
EditableModel.getRowIndex()
public final Integer getRowKey()
EditableModel.getRowKey()
public final Object getRowData()
EditableModel.getRowData()
public void setRowIndex(int rowIndex)
This method calls preRowDataChange()
and
postRowDataChange()
as appropriate.
rowIndex
- The rowIndex of the row that should be made current. Use
-1 to clear the current row.EditableModel.setRowIndex(int)
public void setRowKey(Integer rowKey)
This method calls preRowDataChange()
and
postRowDataChange()
as appropriate.
rowKey
- The rowKey of the row that should be made current. Use
null to clear the current row.EditableModel.setRowKey(java.lang.Integer)
public final void recordValueModified(int index, Object newValue)
EditableModel.recordValueModified(int, java.lang.Object)
public boolean addValue(Object value)
value
- the value to add
public void insertValue(int index, Object value)
IllegalArgumentException
- if model does not handle this index.public Object moveValue(int fromIndex, int toIndex)
IllegalArgumentException
- if model does not handle one of given
indexes.public Object removeValue(int index)
IllegalArgumentException
- if model does not handle this index.public String getModel()
public void setModel(String model)
public Object getTemplate()
public final void setTemplate(Object template)
public Boolean getDiff()
public void setDiff(Boolean diff)
public Integer getNumber()
public void setNumber(Integer number)
public Boolean getRemoveEmpty()
public void setRemoveEmpty(Boolean removeEmpty)
public String getContainerClientId(FacesContext context)
getContainerClientId
in class UIComponent
public String getRendererType()
getRendererType
in class UIComponentBase
public void setRendererType(String rendererType)
setRendererType
in class UIComponentBase
public final void encodeBegin(FacesContext context) throws IOException
encodeBegin
in class UIComponentBase
IOException
public void encodeEnd(FacesContext context) throws IOException
encodeEnd
in class UIComponentBase
IOException
public boolean getRendersChildren()
getRendersChildren
in class UIComponentBase
public void encodeChildren(FacesContext context) throws IOException
encodeChildren
in class UIComponentBase
IOException
public void broadcast(FacesEvent event)
broadcast
in class UIComponentBase
event
- a FacesEvent
AbortProcessingException
public void queueEvent(FacesEvent event)
queueEvent
in class UIComponentBase
event
- a FacesEventpublic void processDecodes(FacesContext context)
processDecodes
in class UIInput
public void processValidators(FacesContext context)
processValidators
in class UIInput
public void processUpdates(FacesContext context)
processUpdates
in class UIInput
public boolean invokeOnComponent(FacesContext context, String clientId, ContextCallback callback) throws FacesException
invokeOnComponent
in class UIComponentBase
FacesException
|
Nuxeo ECM Projects 5.4.3-SNAPSHOT | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |