info.magnolia.ui.form.action
Class SaveFormAction
java.lang.Object
info.magnolia.ui.api.action.AbstractAction<SaveFormActionDefinition>
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 node has no property called 'jcrName'
the value of the property called 'name' if
- the node has a property called 'name' AND
- the node has no property called 'jcrName' AND
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
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
callback
protected EditorCallback callback
validator
protected final EditorValidator validator
item
protected final JcrNodeAdapter item
SaveFormAction
public SaveFormAction(SaveFormActionDefinition definition,
JcrNodeAdapter item,
EditorCallback callback,
EditorValidator validator)
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.