|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.faces.el.PropertyResolver
com.sun.rave.web.ui.faces.DataProviderPropertyResolver
public class DataProviderPropertyResolver
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.
| Field Summary | |
|---|---|
protected javax.faces.el.PropertyResolver |
nested
storage for nested PropertyResolver (decorator pattern) |
static java.lang.String |
OPTIONS_KEY
|
static java.lang.String |
ROWID_FKEY
|
static java.lang.String |
ROWKEY_FKEY
|
static java.lang.String |
SELECT_ITEMS_KEY
|
static java.lang.String |
STRING_LIST_KEY
|
static java.lang.String |
VALUE_KEY
|
| Constructor Summary | |
|---|---|
DataProviderPropertyResolver(javax.faces.el.PropertyResolver nested)
Constructs a DataProviderPropertyResolver using the specified PropertyResolver as the pass-thru PropertyResolver (decorator pattern) |
|
| Method Summary | |
|---|---|
java.lang.Class |
getType(java.lang.Object base,
int row)
|
java.lang.Class |
getType(java.lang.Object base,
java.lang.Object property)
|
java.lang.Object |
getValue(java.lang.Object base,
int row)
|
java.lang.Object |
getValue(java.lang.Object base,
java.lang.Object property)
|
boolean |
isReadOnly(java.lang.Object base,
int row)
|
boolean |
isReadOnly(java.lang.Object base,
java.lang.Object property)
|
void |
setValue(java.lang.Object base,
int row,
java.lang.Object value)
|
void |
setValue(java.lang.Object base,
java.lang.Object property,
java.lang.Object value)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String VALUE_KEY
public static final java.lang.String SELECT_ITEMS_KEY
public static final java.lang.String OPTIONS_KEY
public static final java.lang.String STRING_LIST_KEY
public static final java.lang.String ROWID_FKEY
public static final java.lang.String ROWKEY_FKEY
protected javax.faces.el.PropertyResolver nested
| Constructor Detail |
|---|
public DataProviderPropertyResolver(javax.faces.el.PropertyResolver nested)
nested - PropertyResolver| Method Detail |
|---|
public java.lang.Object getValue(java.lang.Object base,
java.lang.Object property)
throws javax.faces.el.EvaluationException,
javax.faces.el.PropertyNotFoundException
getValue in class javax.faces.el.PropertyResolverjavax.faces.el.EvaluationException
javax.faces.el.PropertyNotFoundException
public java.lang.Object getValue(java.lang.Object base,
int row)
throws javax.faces.el.EvaluationException,
javax.faces.el.PropertyNotFoundException
getValue in class javax.faces.el.PropertyResolverjavax.faces.el.EvaluationException
javax.faces.el.PropertyNotFoundException
public void setValue(java.lang.Object base,
java.lang.Object property,
java.lang.Object value)
throws javax.faces.el.EvaluationException,
javax.faces.el.PropertyNotFoundException
setValue in class javax.faces.el.PropertyResolverjavax.faces.el.EvaluationException
javax.faces.el.PropertyNotFoundException
public void setValue(java.lang.Object base,
int row,
java.lang.Object value)
throws javax.faces.el.EvaluationException,
javax.faces.el.PropertyNotFoundException
setValue in class javax.faces.el.PropertyResolverjavax.faces.el.EvaluationException
javax.faces.el.PropertyNotFoundException
public boolean isReadOnly(java.lang.Object base,
java.lang.Object property)
throws javax.faces.el.EvaluationException,
javax.faces.el.PropertyNotFoundException
isReadOnly in class javax.faces.el.PropertyResolverjavax.faces.el.EvaluationException
javax.faces.el.PropertyNotFoundException
public boolean isReadOnly(java.lang.Object base,
int row)
throws javax.faces.el.EvaluationException,
javax.faces.el.PropertyNotFoundException
isReadOnly in class javax.faces.el.PropertyResolverjavax.faces.el.EvaluationException
javax.faces.el.PropertyNotFoundException
public java.lang.Class getType(java.lang.Object base,
java.lang.Object property)
throws javax.faces.el.EvaluationException,
javax.faces.el.PropertyNotFoundException
getType in class javax.faces.el.PropertyResolverjavax.faces.el.EvaluationException
javax.faces.el.PropertyNotFoundException
public java.lang.Class getType(java.lang.Object base,
int row)
throws javax.faces.el.EvaluationException,
javax.faces.el.PropertyNotFoundException
getType in class javax.faces.el.PropertyResolverjavax.faces.el.EvaluationException
javax.faces.el.PropertyNotFoundException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||