net.sf.doolin.gui.field.table.action
Class NewItemAction<E>

java.lang.Object
  extended by net.sf.doolin.gui.action.AbstractGUIAction
      extended by net.sf.doolin.gui.action.AbstractSimpleGUIAction
          extended by net.sf.doolin.gui.action.DialogAction<E>
              extended by net.sf.doolin.gui.field.table.action.NewItemAction<E>
Type Parameters:
E - Type of object to edit
All Implemented Interfaces:
GUIAction, org.springframework.beans.factory.BeanNameAware

public class NewItemAction<E>
extends DialogAction<E>

This action displays a dialog to create an item and then adds this item to the collection defined by the property path.

Author:
Damien Coraboeuf

Constructor Summary
NewItemAction()
           
 
Method Summary
 String getPropertyPath()
          Gets the property path to the collection to add the new item to
protected  void onOK(ActionContext actionContext, E bean)
          This method is called when the dialog has been validated.
 void setPropertyPath(String propertyPath)
          Sets the property path to the collection to add the new item to
 
Methods inherited from class net.sf.doolin.gui.action.DialogAction
doExecute, getDialog, getModelFactory, onCancelled, setDialog, setModelFactory, setUseContext
 
Methods inherited from class net.sf.doolin.gui.action.AbstractSimpleGUIAction
getIconId, getIconIDExpression, getId, getShortcut, getShortcutExpression, getTextExpression, getTip, getTipExpression, getTitle, init, setBeanName, setIconId, setShortcut, setTip, setTitle, toString
 
Methods inherited from class net.sf.doolin.gui.action.AbstractGUIAction
execute, getActionContextData, getActionContextDataExtractor, getDisplayStateHandler, getIcon, getIconService, setActionContextDataExtractor, setDisplayStateHandler, setIconService
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

NewItemAction

public NewItemAction()
Method Detail

onOK

protected void onOK(ActionContext actionContext,
                    E bean)
Description copied from class: DialogAction
This method is called when the dialog has been validated.

Specified by:
onOK in class DialogAction<E>
Parameters:
actionContext - Action context
bean - Edited bean

getPropertyPath

public String getPropertyPath()
Gets the property path to the collection to add the new item to

Returns:
Property path

setPropertyPath

public void setPropertyPath(String propertyPath)
Sets the property path to the collection to add the new item to

Parameters:
propertyPath - Property path


Copyright © 2011. All Rights Reserved.