public class XMLTreeContentProvider extends NodeTreeContentProvider
Node
s).
If this provider is configured with a row-id xpath expression
(see setRowIdXpath(String)
), the xpath expression
should resolve to a unique row id for each node to display.
If this provider is not configured with a row-id xpath expression,
all elements in the tree will be displayed with an auto-generated row id
(which may not work well if the tree is frequently updated).NodeTreeContentProvider.DummyValueExpression, NodeTreeContentProvider.NodeComparator, NodeTreeContentProvider.NodeIdsIterator
FilterableSelectableListTableContentProvider.RowFilterableValueDecorator
SelectableListTableContentProvider.Row, SelectableListTableContentProvider.RowComparator
Modifier and Type | Field and Description |
---|---|
protected static Object[] |
EMPTY_ARGS |
protected Map<String,PropertyDescriptor> |
m_descriptors |
protected String |
m_rowIdXpath |
m_helper, m_roots, openToDepth
m_filter, m_filterable, m_filterValue, m_unfilteredlist
m_autoIdCounter, m_map, m_originalList, m_selectableHelper
m_array, m_canTemplateRow, m_index, m_list, m_onCreateRow, m_onDeleteRow, m_rowId, m_rowType, m_sort, m_templateRow, m_var
fExpireWithPageFlow
Constructor and Description |
---|
XMLTreeContentProvider()
Creates a new, uninitialized tree content-provider.
|
XMLTreeContentProvider(Node root)
Creates a new tree content-provider with the specified element root.
|
XMLTreeContentProvider(Node root,
String rowIdXpath)
Creates a new tree content-provider with the specified root and row-id xpath expression
(ie the xpath expression resolves to a unique id for each node to display).
|
Modifier and Type | Method and Description |
---|---|
protected Map<String,PropertyDescriptor> |
getPropertyDescriptors()
Returns map of bean property-names to bean property-descriptors
for all of the bean's properties.
|
Node |
getRoot()
Tree root.
|
String |
getRowIdXpath()
Xpath expression which resolves to a unique id for each node to display.
|
Class<?> |
getType(Object propertyKey)
Returns java type of the given property
|
Object |
getValue(Object propertyKey)
Returns value of the given property
|
boolean |
hasProperty(Object propertyKey)
Checks if the given property is supported by this content provider
|
boolean |
isReadOnly(Object propertyKey)
Returns true if the given property is readonly.
|
void |
setRoot(Node root)
Tree root.
|
void |
setRowIdXpath(String rowIdXpath)
Xpath expression which resolves to a unique id for each node to display.
|
void |
setValue(Object propertyKey,
Object value)
Sets new value of the given property
|
calculateRowId, flatten, getCanTemplateRow, getChildIds, getCurrentNode, getCurrentRow, getDepth, getHasChildren, getLastChildAncestors, getOpenIds, getOpenToDepth, getParentId, getRootIds, getUnopenIds, getUseUnopenModel, isFirstChild, isLastChild, isOpen, isRowMixed, isVisible, openTreeNodes, setList, setOpen, setOpenIds, setOpenToDepth, setUnopenIds, sort, sort
filter, getFilter, getRowFilterValueBinding, getRowFilterValueBindingAsString, getRowFilterValueExpression, isFilterable, setFilter, setFilterable, setRowFilterValueBinding, setRowFilterValueBindingAsString, setRowFilterValueExpression
createRow, deleteRow, getList, getNeedRefresh, getRowId, getRowSelectedCount, getRowSelectedIds, getRowUnselectedIds, getSelectedRows, getUseUnselectedModel, isAddressable, isAutoRefresh, isRowSelected, moveTo, refresh, setAutoRefresh, setCurrentRow, setNeedRefresh, setRowById, setRowSelected, setRowSelectedIds, setRowUnselectedIds, setRowVariable, setTemplateRow, supportsAutoRefresh, updateOriginalList
calculateRowId, getArray, getOnCreateRow, getOnCreateRowExpression, getOnDeleteRow, getOnDeleteRowExpression, getPropertyKeys, getRowCount, getRowIdBinding, getRowIdExpression, getRowIndex, getRowType, getRowVariable, getSort, isReorderable, isRowAvailable, isTemplateRow, newRow, setArray, setCanTemplateRow, setOnCreateRow, setOnCreateRowExpression, setOnDeleteRow, setOnDeleteRowExpression, setRowId, setRowIdBinding, setRowIdExpression, setRowIndex, setRowType, setSort, toString
getExpireWithPageFlow, setExpireWithPageFlow
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getRowSelectedCount, getRowSelectedIds, getRowUnselectedIds, getUseUnselectedModel, isRowSelected, setRowSelected, setRowSelectedIds, setRowUnselectedIds
getRowId, isAddressable, setRowById
getRowCount, getRowIndex, getRowVariable, isRowAvailable, setRowIndex, setRowVariable
getPropertyKeys, toString
protected static final Object[] EMPTY_ARGS
protected Map<String,PropertyDescriptor> m_descriptors
protected String m_rowIdXpath
public XMLTreeContentProvider()
public XMLTreeContentProvider(Node root)
public Class<?> getType(Object propertyKey) throws PropertyNotFoundException
IContentProvider
getType
in interface IContentProvider
getType
in class ListTableContentProvider
propertyKey
- the property key of type String
or Integer
Class
PropertyNotFoundException
- if property is not supportedpublic Object getValue(Object propertyKey) throws ELException, PropertyNotFoundException
IContentProvider
getValue
in interface IContentProvider
getValue
in class ListTableContentProvider
propertyKey
- the property key of type String
or Integer
null
PropertyNotFoundException
- if property is not supportedELException
public boolean hasProperty(Object propertyKey)
IContentProvider
hasProperty
in interface IContentProvider
hasProperty
in class ListTableContentProvider
propertyKey
- property key of type String
or Integer
true
if property is supportedpublic boolean isReadOnly(Object propertyKey) throws ELException, PropertyNotFoundException
IUpdateableContentProvider
Returns true if the given property is readonly. If it is readonly, IUpdateableContentProvider.setValue(Object, Object)
will
definitely fail.
isReadOnly
in interface IUpdateableContentProvider
isReadOnly
in class ListTableContentProvider
propertyKey
- property key of type String
or Integer
PropertyNotFoundException
ELException
public void setValue(Object propertyKey, Object value) throws ELException, PropertyNotFoundException
IUpdateableContentProvider
Sets new value of the given property
setValue
in interface IUpdateableContentProvider
setValue
in class ListTableContentProvider
propertyKey
- property key of type String
or Integer
value
- new property valuePropertyNotFoundException
- if property is not foundELException
public Node getRoot()
public void setRoot(Node root)
public String getRowIdXpath()
public void setRowIdXpath(String rowIdXpath)
protected Map<String,PropertyDescriptor> getPropertyDescriptors()