Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## 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:
  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.java 615336 2008-01-25 20:48:44Z vgritsenko $

Field Summary

Fields inherited from class org.apache.cocoon.forms.formmodel.AbstractWidgetDefinitionBuilder
`datatypeManager, expressionManager, widgetDefinitionBuilders, widgetListenerBuilders, widgetValidatorBuilders`

Constructor Summary
`CalculatedFieldDefinitionBuilder()`

Method Summary
`WidgetDefinition` | `buildWidgetDefinition(Element widgetElement, WidgetDefinitionBuilderContext context)`
`void` | `setCalculatedFieldAlgorithmBuilders(Map calculatedFieldAlgorithmBuilders)`
`void` | `setDefaultCalculatedFieldAlgorithmBuilder(String defaultCalculatedFieldAlgorithmBuilder)`
`protected void` | `setupDefinition(Element widgetElement, CalculatedFieldDefinition definition, WidgetDefinitionBuilderContext context)`

Methods inherited from class org.apache.cocoon.forms.formmodel.FieldDefinitionBuilder
`setupDefinition`

Methods inherited from class org.apache.cocoon.forms.formmodel.AbstractDatatypeWidgetDefinitionBuilder
`buildSelectionList, getProcessInfoProvider, setDefaultSelectionListBuilder, setProcessInfoProvider, setSelectionListBuilders, setSourceResolver, setupDefinition, setupDefinition, setXmlizer`

Methods inherited from class org.apache.cocoon.forms.formmodel.AbstractWidgetDefinitionBuilder
`buildAnotherWidgetDefinition, buildEventListeners, buildWidgetDefinition, setCommonProperties, setCreateListeners, setDatatypeManager, setDisplayData, setExpressionManager, setupDefinition, setValidators, setWidgetDefinitionBuilders, setWidgetListenerBuilders, setWidgetValidatorBuilders`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### CalculatedFieldDefinitionBuilder

    public CalculatedFieldDefinitionBuilder()

Method Detail

### 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`

### setCalculatedFieldAlgorithmBuilders

    public void setCalculatedFieldAlgorithmBuilders(Map calculatedFieldAlgorithmBuilders)

### setDefaultCalculatedFieldAlgorithmBuilder

    public void setDefaultCalculatedFieldAlgorithmBuilder(String defaultCalculatedFieldAlgorithmBuilder)

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 1999-2008 The Apache Software Foundation. All Rights Reserved.