public class UIEditableList extends UIInput implements NamingContainer
Allows to add/remove elements from an UIEditableList, inspired from
Trinidad UIXCollection component.
| Modifier and Type | Field and Description |
|---|---|
static String |
COMPONENT_FAMILY |
static String |
COMPONENT_TYPE |
CONVERSION_MESSAGE_ID, REQUIRED_MESSAGE_ID, UPDATE_MESSAGE_IDSEPARATOR_CHAR| Constructor and Description |
|---|
UIEditableList() |
| Modifier and Type | Method and Description |
|---|---|
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.
|
addValidator, addValueChangeListener, decode, getConverterMessage, getRequiredMessage, getSubmittedValue, getValidator, getValidatorMessage, getValidators, getValueChangeListener, getValueChangeListeners, isImmediate, isLocalValueSet, isRequired, isValid, removeValidator, removeValueChangeListener, resetValue, setConverterMessage, setImmediate, setLocalValueSet, setRequired, setRequiredMessage, setSubmittedValue, setValid, setValidator, setValidatorMessage, setValue, setValueChangeListener, updateModel, validategetConverter, getLocalValue, setConverterfindComponent, getAttributes, getChildCount, getChildren, getClientId, getFacet, getFacetCount, getFacets, getFacetsAndChildren, getId, getParent, getValueBinding, isRendered, isTransient, processRestoreState, processSaveState, restoreAttachedState, saveAttachedState, setId, setParent, setRendered, setTransient, setValueBindingencodeAll, getValueExpression, setValueExpressionequals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetConverter, getLocalValue, setConverterpublic static final String COMPONENT_TYPE
public static final String COMPONENT_FAMILY
public Object saveState(FacesContext context)
saveState in interface StateHoldersaveState in class UIInputpublic Object getValue()
getValue in interface ValueHoldergetValue in class UIOutputpublic Object getDefaultValue()
public void setDefaultValue(Object defaultValue)
public void restoreState(FacesContext context, Object state)
restoreState in interface StateHolderrestoreState in class UIInputpublic 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)
public boolean addValue(Object value)
value - the value to addpublic 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 UIComponentpublic String getRendererType()
getRendererType in class UIComponentBasepublic void setRendererType(String rendererType)
setRendererType in class UIComponentBasepublic final void encodeBegin(FacesContext context) throws IOException
encodeBegin in class UIComponentBaseIOExceptionpublic void encodeEnd(FacesContext context) throws IOException
encodeEnd in class UIComponentBaseIOExceptionpublic boolean getRendersChildren()
getRendersChildren in class UIComponentBasepublic void encodeChildren(FacesContext context) throws IOException
encodeChildren in class UIComponentBaseIOExceptionpublic void broadcast(FacesEvent event)
broadcast in class UIComponentBaseevent - a FacesEventAbortProcessingExceptionpublic void queueEvent(FacesEvent event)
queueEvent in class UIComponentBaseevent - a FacesEventpublic void processDecodes(FacesContext context)
processDecodes in class UIInputpublic void processValidators(FacesContext context)
processValidators in class UIInputpublic void processUpdates(FacesContext context)
processUpdates in class UIInputpublic boolean invokeOnComponent(FacesContext context, String clientId, ContextCallback callback) throws FacesException
invokeOnComponent in class UIComponentBaseFacesExceptionCopyright © 2011 Nuxeo SA. All Rights Reserved.