org.apache.cocoon.woody.formmodel
Class RepeaterActionDefinition

java.lang.Object
  extended by org.apache.cocoon.woody.formmodel.AbstractWidgetDefinition
      extended by org.apache.cocoon.woody.formmodel.ActionDefinition
          extended by org.apache.cocoon.woody.formmodel.RepeaterActionDefinition
All Implemented Interfaces:
WidgetDefinition
Direct Known Subclasses:
AddRowActionDefinition, DeleteRowsActionDefinition

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:
CVS $Id: RepeaterActionDefinition.html 1304258 2012-03-23 10:09:27Z ilgrosso $
Author:
Sylvain Wallez
See Also:
RepeaterActionDefinitionBuilder

Field Summary
 
Fields inherited from class org.apache.cocoon.woody.formmodel.AbstractWidgetDefinition
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.
 
Methods inherited from class org.apache.cocoon.woody.formmodel.ActionDefinition
addActionListener, fireActionEvent, getActionCommand, hasActionListeners, setActionCommand
 
Methods inherited from class org.apache.cocoon.woody.formmodel.AbstractWidgetDefinition
addValidator, generateDisplayData, generateDisplayData, generateLabel, getFormDefinition, getId, getLocation, getParent, setDisplayData, setId, setLocation, setParent, validate
 
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

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-2010 The Apache Software Foundation. All Rights Reserved.