public class XMLTableContentProvider extends SelectableListTableContentProvider
Node
s.
If this provider is configured with a rows xpath expression
(see setRowsXpath(String)
), the xpath expression
should resolve to a list of elements to display.
If this provider is not configured with a rows xpath expression,
the child elements of the root node will be displayed.SelectableListTableContentProvider.Row, SelectableListTableContentProvider.RowComparator
Modifier and Type | Field and Description |
---|---|
protected static Object[] |
EMPTY_ARGS |
protected Map<String,PropertyDescriptor> |
m_descriptors |
protected Node |
m_root |
protected String |
m_rowsXpath |
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 |
---|
XMLTableContentProvider()
Creates a new, uninitialized table content-provider.
|
XMLTableContentProvider(Node root)
Creates a new table content-provider initialized with the specified root node.
|
XMLTableContentProvider(Node root,
String rowsXpath)
Creates a new table content-provider initialized with the specified root node,
and an xpath expression to apply to the root node to produce a list of elements to display.
|
XMLTableContentProvider(Node root,
String rowsXpath,
String rowIdBinding,
String rowVariable)
Creates a new table content-provider initialized with the specified root node,
an xpath expression to apply to the root node to produce a list of elements to display,
and a value-binding expression to use to produce a unique id for each node
(using the specified row variable to identify the current row in the value-binding expression).
|
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()
Root node.
|
String |
getRowsXpath()
Xpath expression to apply to the root node to produce a list of elements 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)
Root node.
|
void |
setRowsXpath(String rowsXpath)
Xpath expression to apply to the root node to produce a list of elements to display.
|
void |
setValue(Object propertyKey,
Object value)
Sets new value of the given property
|
createRow, deleteRow, getCurrentRow, getList, getNeedRefresh, getRowId, getRowSelectedCount, getRowSelectedIds, getRowUnselectedIds, getSelectedRows, getUseUnselectedModel, isAddressable, isAutoRefresh, isRowSelected, moveTo, refresh, setAutoRefresh, setCurrentRow, setList, setNeedRefresh, setRowById, setRowSelected, setRowSelectedIds, setRowUnselectedIds, setRowVariable, setTemplateRow, sort, supportsAutoRefresh, updateOriginalList
calculateRowId, calculateRowId, getArray, getCanTemplateRow, 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
getRowCount, getRowIndex, getRowVariable, isRowAvailable, setRowIndex
getPropertyKeys, toString
protected static final Object[] EMPTY_ARGS
protected Map<String,PropertyDescriptor> m_descriptors
protected String m_rowsXpath
protected Node m_root
public XMLTableContentProvider()
public XMLTableContentProvider(Node root)
public XMLTableContentProvider(Node root, String rowsXpath)
public XMLTableContentProvider(Node root, String rowsXpath, String rowIdBinding, String rowVariable)
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 getRowsXpath()
public void setRowsXpath(String rowsXpath)
protected Map<String,PropertyDescriptor> getPropertyDescriptors()