org.apache.cocoon.forms.formmodel
Class RepeaterActionDefinition

java.lang.Object
  extended byorg.apache.cocoon.forms.formmodel.AbstractWidgetDefinition
      extended byorg.apache.cocoon.forms.formmodel.ActionDefinition
          extended byorg.apache.cocoon.forms.formmodel.RepeaterActionDefinition
All Implemented Interfaces:
org.apache.cocoon.util.location.Locatable, WidgetDefinition
Direct Known Subclasses:
RepeaterActionDefinition.AddRowActionDefinition, RepeaterActionDefinition.ChangePageActionDefinition, RepeaterActionDefinition.DeleteRowsActionDefinition, RepeaterActionDefinition.InsertRowsActionDefinition, RepeaterActionDefinition.SortActionDefinition

public abstract class RepeaterActionDefinition
extends ActionDefinition

Abstract repeater action. Subclasses will typically just self-add an event handler that will act on the repeater.

Version:
$Id: RepeaterActionDefinition.html 1304280 2012-03-23 11:18:01Z ilgrosso $
See Also:
RepeaterActionDefinitionBuilder

Nested Class Summary
static class RepeaterActionDefinition.AddRowActionDefinition
          The definition of a repeater action that adds a row to a sibling repeater.
static class RepeaterActionDefinition.ChangePageActionDefinition
           
static class RepeaterActionDefinition.DeleteRowsActionDefinition
          The definition of a repeater action that deletes the selected rows of a sibling repeater.
static class RepeaterActionDefinition.InsertRowsActionDefinition
          The definition of a repeater action that insert rows before the selected rows in a sibling repeater, or at the end of the repeater if no row is selected.
static class RepeaterActionDefinition.SortActionDefinition
           
 
Field Summary
 
Fields inherited from class org.apache.cocoon.forms.formmodel.AbstractWidgetDefinition
createListener, enclosingLibrary, parent
 
Constructor Summary
RepeaterActionDefinition()
          Builds an action whose target repeater is the parent of this widget
RepeaterActionDefinition(String repeaterName)
          Builds an action whose target is a sibling of this widget
 
Method Summary
 Widget createInstance()
          Creates and returns a widget based on this widget definition.
 String getRepeaterName()
          Get the name of the repeater on which to act.
 void initializeFrom(WidgetDefinition definition)
          initialize this definition with the other, sort of like a copy constructor
 
Methods inherited from class org.apache.cocoon.forms.formmodel.ActionDefinition
addActionListener, fireActionEvent, getActionCommand, hasActionListeners, setActionCommand
 
Methods inherited from class org.apache.cocoon.forms.formmodel.AbstractWidgetDefinition
addCreateListener, addValidator, checkCompleteness, checkMutable, fireCreateEvent, generateDisplayData, generateDisplayData, generateLabel, getAttribute, getEnclosingLibrary, getFormDefinition, getId, getLocation, getParent, getState, makeImmutable, setAttributes, setDisplayData, setEnclosingLibrary, setId, setLocation, setParent, setState, validate, widgetCreated
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RepeaterActionDefinition

public RepeaterActionDefinition()
Builds an action whose target repeater is the parent of this widget


RepeaterActionDefinition

public RepeaterActionDefinition(String repeaterName)
Builds an action whose target is a sibling of this widget

Parameters:
repeaterName - the name of the repeater
Method Detail

initializeFrom

public void initializeFrom(WidgetDefinition definition)
                    throws Exception
initialize this definition with the other, sort of like a copy constructor

Specified by:
initializeFrom in interface WidgetDefinition
Overrides:
initializeFrom in class ActionDefinition
Throws:
Exception

createInstance

public Widget createInstance()
Description copied from interface: WidgetDefinition
Creates and returns a widget based on this widget definition.

Specified by:
createInstance in interface WidgetDefinition
Overrides:
createInstance in class ActionDefinition

getRepeaterName

public String getRepeaterName()
Get the name of the repeater on which to act. If null, the repeater is the parent of the current widget (i.e. actions are in repeater rows). Otherwise, the repeater is a sibling of the current widget.

Returns:
the repeater name (can be null).


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