| |
|
| java.lang.Object org.apache.cocoon.forms.formmodel.AbstractWidget org.apache.cocoon.forms.formmodel.Field org.apache.cocoon.forms.formmodel.CalculatedField
CalculatedField | public class CalculatedField extends Field (Code) | | A field which calculates its value.
A calculated field is useful to create fields containing a sum, or a percentage, or any other
value derived from other fields in the form.
The way the field calculates its value is determined by its
org.apache.cocoon.forms.formmodel.CalculatedFieldAlgorithm .
The algorithm is also responsible for determining which other form widgets will trigger
a value calculation for this field.
version: $Id: CalculatedField.java 449149 2006-09-23 03:58:05Z crossley $ |
convert | protected Object convert(Object ret, Datatype datatype) throws Exception(Code) | | Tries to convert the return value of the algorithm to the right value for this field datatype.
Parameters: ret - The return value fo the algorithm. Parameters: datatype - The target datatype. A converted value, or the given ret value if no conversion was possible. |
initialize | public void initialize()(Code) | | |
installHandlers | protected void installHandlers()(Code) | | Installs handlers on other widgets. This both forces other widget to
submit the form when their values change, and also gives this field
a good optimization on calls to its algorithm.
|
readFromRequest | protected void readFromRequest(String newEnteredValue)(Code) | | |
recalculate | protected Object recalculate()(Code) | | Calls the algorithm to perform a recaulculation.
The calculated value for this field. |
Fields inherited from org.apache.cocoon.forms.formmodel.AbstractWidget | protected boolean wasValid(Code)(Java Doc)
|
|
|
|