DataProviderPropertyResolver is a
PropertyResolver implementation that, if the base
parameter is a
DataProvider , passes calls to getValue() ,
getType() , isReadOnly() , and setValue()
to the corresponding
DataProvider instance. Otherwise, it follows
the standard JSF decorator pattern and delegates processing to the decorated
PropertyResolver instance.
These expressions are supported:
#{...myDataProvider.value.FIELD_ID}
#{...myDataProvider.value['FIELD_ID']}
--> binds to the value of the
FieldKey corresponding to 'FIELD_ID' in
a DataProvider *or* the cursor row of a TableDataProvider. If the specified
FIELD_ID does not correspond to a FieldKey in the DataProvider, this property
resolver will throw a PropertyNotFoundException, and include any nested
exceptions.
#{...myDataProvider.value[':ROWKEY:']}
--> binds to the 'cursorRow'
RowKey of a TableDataProvider or the
'tableRow' RowKey of a TableRowDataProvider. If the DataProvider is not one
of these, this binds to nothing. Note that cursor or tableRow can be
driven* by this binding. It is not read-only.
#{...myDataProvider.value[':ROWID:']}
--> binds to the 'cursorRow'
RowKey 's ID (String) of a
TableDataProvider or the 'tableRow' RowKey's ID of a TableRowDataProvider.
If the DataProvider is not one of these, this binds to nothing. Note that
cursor or tableRow can be *driven* by this binding. It is not read-only.
#{...myDataProvider.selectItems.FIELD_ID}
#{...myDataProvider.selectItems['FIELD_ID']}
#{...myDataProvider.selectItems['VALUE_FIELD_ID,LABEL_FIELD_ID']}
#{...myDataProvider.selectItems['VALUE_FIELD_ID,LABEL_FIELD_ID,DESC_FIELD_ID']}
#{...myDataProvider.selectItems[':ROWKEY:,:ROWKEY:,:ROWKEY:']}
#{...myDataProvider.selectItems[':ROWID:,:ROWID:,:ROWID:']}
--> binds to an array of
SelectItem generated by scanning the rows of
the TableDataProvider (without moving the cursor). If the base object is a
DataProvider, but not a TableDataProvider, the resulting SelectItem[] will
have one element. Note that the special :ROWKEY: and :ROWID: field IDs can
be used here.
#{...myDataProvider.options.FIELD_ID}
#{...myDataProvider.options['FIELD_ID']}
#{...myDataProvider.options['VALUE_FIELD_ID,LABEL_FIELD_ID']}
#{...myDataProvider.options['VALUE_FIELD_ID,LABEL_FIELD_ID,DESC_FIELD_ID']}
#{...myDataProvider.options[':ROWKEY:,:ROWKEY:,:ROWKEY:']}
#{...myDataProvider.options[':ROWID:,:ROWID:,:ROWID:']}
--> binds to an array of
Option generated by scanning the rows of the
TableDataProvider (without moving the cursor). If the base object is a
DataProvider, but not a TableDataProvider, the resulting Option[] will have
one element. Note that the special :ROWKEY: and :ROWID: field IDs can be
used here.
#{...myDataProvider.stringList.FIELD_ID}
#{...myDataProvider.stringList['FIELD_ID']}
#{...myDataProvider.stringList[':ROWKEY:']}
#{...myDataProvider.stringList[':ROWID:']}
--> binds to an array of String generated by scanning the rows of the
TableDataProvider (without moving the cursor) and calling toString() on each
value. If the base object is a DataProvider, but not a TableDataProvider,
the resulting String[] will have one element. Note that the special :ROWKEY:
and :ROWID: field IDs can be used here.
author: Joe Nuxoll |