com.ivata.mask.web.struts
Class NewAction

java.lang.Object
  extended byorg.apache.struts.action.Action
      extended bycom.ivata.mask.web.struts.MaskAction
          extended bycom.ivata.mask.web.struts.NewAction

public class NewAction
extends MaskAction

Create a new value object and create a form for it in the request scope.

Since:
ivata masks 0.1 (2004-05-10)
Version:
$Revision: 1.7.2.1 $
Author:
Colin MacLeod colin.macleod@ivata.com

Field Summary
 
Fields inherited from class org.apache.struts.action.Action
defaultLocale, servlet
 
Constructor Summary
NewAction(com.ivata.mask.MaskFactory maskFactoryParam, MaskAuthenticator authenticatorParam)
           Construct an action to create new value objects.
 
Method Summary
protected  InputMaskForm createInputMaskForm(javax.servlet.http.HttpServletRequest requestParam, com.ivata.mask.valueobject.ValueObject valueObjectParam, com.ivata.mask.Mask maskParam, java.lang.Class baseClassParam)
           Override this method to create a different class of input mask form.
 java.lang.String execute(org.apache.struts.action.ActionMapping mapping, org.apache.struts.action.ActionErrors errors, org.apache.struts.action.ActionForm form, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, javax.servlet.http.HttpSession session)
           Generic method called by the Struts interface.
 
Methods inherited from class com.ivata.mask.web.struts.MaskAction
clear, execute, getAuthenticator, getFromRequestOrForm, getFromRequestOrForm, getInputMask, getListMask, getMaskFactory, isCancelled, onConfirm, onDelete, setLogin
 
Methods inherited from class org.apache.struts.action.Action
addErrors, addMessages, execute, generateToken, getDataSource, getDataSource, getErrors, getLocale, getMessages, getResources, getResources, getServlet, isTokenValid, isTokenValid, resetToken, saveErrors, saveErrors, saveMessages, saveMessages, saveToken, setLocale, setServlet
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NewAction

public NewAction(com.ivata.mask.MaskFactory maskFactoryParam,
                 MaskAuthenticator authenticatorParam)

Construct an action to create new value objects.

Parameters:
maskFactoryParam - Refer to MaskAction.MaskAction(com.ivata.mask.MaskFactory, com.ivata.mask.web.struts.MaskAuthenticator).
authenticatorParam - Refer to MaskAction.MaskAction(com.ivata.mask.MaskFactory, com.ivata.mask.web.struts.MaskAuthenticator).
Method Detail

createInputMaskForm

protected InputMaskForm createInputMaskForm(javax.servlet.http.HttpServletRequest requestParam,
                                            com.ivata.mask.valueobject.ValueObject valueObjectParam,
                                            com.ivata.mask.Mask maskParam,
                                            java.lang.Class baseClassParam)

Override this method to create a different class of input mask form.

Parameters:
requestParam - Refer to InputMaskForm.InputMaskForm(com.ivata.mask.valueobject.ValueObject, com.ivata.mask.Mask, java.lang.Class).
valueObjectParam - Refer to InputMaskForm.InputMaskForm(com.ivata.mask.valueobject.ValueObject, com.ivata.mask.Mask, java.lang.Class).
maskParam - Refer to InputMaskForm.InputMaskForm(com.ivata.mask.valueobject.ValueObject, com.ivata.mask.Mask, java.lang.Class).
baseClassParam - Refer to InputMaskForm.InputMaskForm(com.ivata.mask.valueobject.ValueObject, com.ivata.mask.Mask, java.lang.Class).
Returns:
new input mask form instance.

execute

public java.lang.String execute(org.apache.struts.action.ActionMapping mapping,
                                org.apache.struts.action.ActionErrors errors,
                                org.apache.struts.action.ActionForm form,
                                javax.servlet.http.HttpServletRequest request,
                                javax.servlet.http.HttpServletResponse response,
                                javax.servlet.http.HttpSession session)
                         throws com.ivata.mask.util.SystemException

Generic method called by the Struts interface. Creates the value object and a form. Always returns success.

Overrides:
execute in class MaskAction
Parameters:
mapping - The ActionMapping used to select this instance.
errors - valid errors object to append errors to. If there are any errors, the action will return to the input.
form - optional ActionForm bean for this request (if any)
request - non-HTTP request we are processing
response - The non-HTTP response we are creating
session - returned from the request parameter.
Returns:
this method returns the string used to identify the correct Struts ActionForward which should follow this page, or null if it should return to the input.
Throws:
com.ivata.mask.util.SystemException - if there is any problem which prevents processing. It will result in the webapp being forwarded to the standard error page.


Copyright © 2001-2005 ivata limited. All Rights Reserved.