org.apache.cocoon.forms.formmodel
Class CalculatedFieldDefinitionBuilder
java.lang.Object
org.apache.cocoon.forms.formmodel.AbstractWidgetDefinitionBuilder
org.apache.cocoon.forms.formmodel.AbstractDatatypeWidgetDefinitionBuilder
org.apache.cocoon.forms.formmodel.FieldDefinitionBuilder
org.apache.cocoon.forms.formmodel.CalculatedFieldDefinitionBuilder
- All Implemented Interfaces:
- Disposable, Serviceable, WidgetDefinitionBuilder
public class CalculatedFieldDefinitionBuilder
- extends FieldDefinitionBuilder
Builder for CalculatedField
s.
A common calculated field definition is as follows :
<fd:calculatedfield id="id" [state="{invisible|output|disabled|active}"]>
<fd:datatype base="...">...</fd:datatype>
<fd:label>...</fd:label>
<fd:value type="...">...</fd:algorithm>
</fd:calculatedfield>
Since it inherits from Field
,
other attributes and elements may be specified, like listeners (on-value-changed, on-create etc..) or
selection lists (which could make sense if the algorithm calculates one value between many possibilities).
Note that the default state is active, althought typing in a calculated field is useless. The state invisible
can be used to create fields which are used as temporary value placeholders in a chain of calculations.
- Version:
- $Id: CalculatedFieldDefinitionBuilder.html 1304258 2012-03-23 10:09:27Z ilgrosso $
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CalculatedFieldDefinitionBuilder
public CalculatedFieldDefinitionBuilder()
buildWidgetDefinition
public WidgetDefinition buildWidgetDefinition(Element widgetElement,
WidgetDefinitionBuilderContext context)
throws Exception
- Specified by:
buildWidgetDefinition
in interface WidgetDefinitionBuilder
- Overrides:
buildWidgetDefinition
in class FieldDefinitionBuilder
- Throws:
Exception
setupDefinition
protected void setupDefinition(Element widgetElement,
CalculatedFieldDefinition definition,
WidgetDefinitionBuilderContext context)
throws Exception
- Throws:
Exception
Copyright © 1999-2010 The Apache Software Foundation. All Rights Reserved.