| java.lang.Object uk.org.ponder.rsf.components.UIComponent uk.org.ponder.rsf.components.UIBound
All known Subclasses: uk.org.ponder.rsf.components.UIBoundList, uk.org.ponder.rsf.components.UIBoundBoolean, uk.org.ponder.rsf.components.UIBoundString, uk.org.ponder.rsf.components.UIOutputMultiline,
UIBound | abstract public class UIBound extends UIComponent (Code) | | This is essentially the core RSF component.
Represents a single (possibly vector) value as transferred between the bean
model and the rendererd view. Unless this is a pure output component, the
value will be bound to an (EL) bean reference. This reference is used both on
render to give them their initial values, and on submission to apply the
input value to the model.
Immediate descendents are UIInput(One) and UIInputMany, as well as UIOutput.
A bound value may well be the container for other bound values, or
annotations of other types. However, any containment hierarchy below this
level is invisible to IKAT, which hands off component subtrees to renderers
at anything below UIBranchContainer.
The most important and commonly set fields of UIBound are value
and valuebinding . The fields willinput and
fossilize are generally set by subclasses such as UIInput and
UIOutput used to define the nature of the component. The fields
darshaper and resolver are set in more advanced
scenarios where some type adjustment is required. Finally the fields
fossilizedbinding and fossilizedshaper should
not be set by client code - they are a convenient repository for rendered
bindings as they pass through the fixup stage.
author: Antranig Basman (antranig@caret.cam.ac.uk) |
Field Summary | |
public ELReference | darreshaper An EL reference to a "DAR reshaper" that should be used to adjust the value
of any attempt to write a value based on the valuebinding. | public boolean | fossilize A field recording whether the value of this binding at render time will be
"fossilized", i.e. | public UIParameter | fossilizedbinding The key/value pair that will be submitted to implement the fossilized
binding. | public UIParameter | fossilizedshaper The key/value pair of the binding corresponding to the DAR reshaper. | public boolean | mustapply A field recording whether "unchanged value detection" will apply to this
component's submission. | public Object | resolver A reference to an object, or an object that can be converted to, a
LeafRenderer or BeanResolver that can render the bound value above
to and from a String representation, or applied to elements of the array
if a String array. | public String | submittingname The key that this bound control will submit under. | protected Object | value The "initial" or "current" value of the component. | public ELReference | valuebinding The EL value reference that this component's value is bound to. | public boolean | willinput A field recording whether any input is expected to result from this
component. |
darreshaper | public ELReference darreshaper(Code) | | An EL reference to a "DAR reshaper" that should be used to adjust the value
of any attempt to write a value based on the valuebinding. The reference
should be to a bean of type
uk.org.ponder.mapping.DARReshaper .
This is principally (currently) useful for selection controls, where a
write of the value (typically an Object ID) that was read via the
valuebinding would not have the "correct" effect on the object model. This
field will typically be null .
|
fossilize | public boolean fossilize(Code) | | A field recording whether the value of this binding at render time will be
"fossilized", i.e. recorded by the client and resubmitted with modified
values. Defaults to true for input components, and
false for output components.
Producers of output components with high consistency requirements (i.e.
those that will be used to provide critical values to users during multi-
requests should override the constructor default in UIOutput with
true .
|
fossilizedbinding | public UIParameter fossilizedbinding(Code) | | The key/value pair that will be submitted to implement the fossilized
binding. Component producers should NOT attempt to set this field, it will
be computed during a fixup.
|
fossilizedshaper | public UIParameter fossilizedshaper(Code) | | The key/value pair of the binding corresponding to the DAR reshaper. Again,
computed during fixup stage if the darshaper is set.
|
mustapply | public boolean mustapply(Code) | | A field recording whether "unchanged value detection" will apply to this
component's submission. If this flag is set to true , submitted
values will *always* be applied to the model irrespective of any
environment settings.
|
resolver | public Object resolver(Code) | | A reference to an object, or an object that can be converted to, a
LeafRenderer or BeanResolver that can render the bound value above
to and from a String representation, or applied to elements of the array
if a String array.
|
submittingname | public String submittingname(Code) | | The key that this bound control will submit under. May be set during
early fixup - if not, will default to the fullID of the component, unless
the renderer has special requirements (e.g. radio button group).
|
value | protected Object value(Code) | | The "initial" or "current" value of the component. Since components in
general only exist between production and rendering, this value is a
transit between these processes and is not subject to any amusing
processing. In general, this value may be set an initial value by
the producer. If it is not set a value, and the
valuebinding is set, the value will be queried from the bean
model during the fixup phase.
I would dearly have loved to have made this value of differing concrete
types in subclasses (boolean , String[] &c)
but this created too much of a burden for fixup code. Also, fixups need to
be able to reliably distinguish a missing value null which
would be impossible with a primitive type.
Most importantly, value itself must never become
independently visible as an bean property to serializers, which should
instead only see the typesafe access functions defined in subclasses. For
this reason, the field itself is protected, and the accessors are called
acquireValue and updateValue
|
valuebinding | public ELReference valuebinding(Code) | | The EL value reference that this component's value is bound to. This will
be a string of the form #{rootbean.property1.property2}
|
willinput | public boolean willinput(Code) | | A field recording whether any input is expected to result from this
component. Note that if this flag is set to true , the
fossilize flag MUST also be set to true.
|
acquireValue | public Object acquireValue()(Code) | | Returns the "value" Object reference. This method and
updateValue are not named "get" and "set" to avoid confusing
bean serialisers.
|
updateValue | public void updateValue(Object value)(Code) | | Sets the "value" Object reference
|
|
|