info.magnolia.ui.form.action
Class SaveFormAction

java.lang.Object
  extended by info.magnolia.ui.api.action.AbstractAction<SaveFormActionDefinition>
      extended by info.magnolia.ui.form.action.SaveFormAction
All Implemented Interfaces:
Action

public class SaveFormAction
extends AbstractAction<SaveFormActionDefinition>

Action for saving Items in Forms.
The name of the created node will be set to:
the value of the property called 'jcrName' if

the value of the property called 'name' if a default name if non of these conditions are valid
To change this behavior extend this Action and override setNodeName(Node, JcrNodeAdapter)

See Also:
SaveFormActionDefinition

Field Summary
protected  EditorCallback callback
           
protected  JcrNodeAdapter item
           
protected  EditorValidator validator
           
 
Constructor Summary
SaveFormAction(SaveFormActionDefinition definition, JcrNodeAdapter item, EditorCallback callback, EditorValidator validator)
           
 
Method Summary
 void execute()
          Executes the action.
protected  void setNodeName(javax.jcr.Node node, JcrNodeAdapter item)
          Set the node Name.
 
Methods inherited from class info.magnolia.ui.api.action.AbstractAction
getDefinition
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

callback

protected EditorCallback callback

validator

protected final EditorValidator validator

item

protected final JcrNodeAdapter item
Constructor Detail

SaveFormAction

public SaveFormAction(SaveFormActionDefinition definition,
                      JcrNodeAdapter item,
                      EditorCallback callback,
                      EditorValidator validator)
Method Detail

execute

public void execute()
             throws ActionExecutionException
Description copied from interface: Action
Executes the action.

Throws:
ActionExecutionException - if an error occurs performing the action

setNodeName

protected void setNodeName(javax.jcr.Node node,
                           JcrNodeAdapter item)
                    throws javax.jcr.RepositoryException
Set the node Name. Node name is set to:
the value of the property 'name' if it is present.

Throws:
javax.jcr.RepositoryException


Copyright © 2013 Magnolia International Ltd.. All Rights Reserved.