You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Ralf Lorenz <ra...@subsist.de> on 2002/09/19 16:25:35 UTC

DispatchAction & DynaValidatorForm problem!

Hi there,
I'm trying to put the processing of a complete step (insert a new entry into
a table of my database) with one Action.
Therefore I found a very useful discussion at
http://www.mail-archive.com/struts-user@jakarta.apache.org/msg32366.html
I decided to take a DispatchAction and a DynaValidatorForm.
The complete step consist of just 2 steps.
A simple link - /ProcessProjectCreation.do?method=populate - should invoke
the populate method to populate the Form with
data from the database. This Form is then shown to the user.
The user then inputs the relevant data and invokes with  -
/ProcessProjectCreation.do?method=add - the add method of the Form
which inserts the new entry into the database.

The problem of this way is that in the first step the validator tries to
validate the form, which actually has no values because it must be filled
first from the populate-method and the users input.
The question is if this can somehow be configured that the form will not be
validated in the first step or do I have to use 2 action classes for this?

The second question is the about the ActionForms itself. Can somebody tell
me where this classes are located (request, session). I don't understand
this
right now. When I populate the Form in the first step in one Action. Do I
have to put it to the request or the session object by myself or is struts
doing that
for me?
Can somebody give me an advice how to solve this issue best ?
Ralf

configuration:

<form-bean
     name="createProjectForm"
     dynamic="true"
     type="de.subsist.zeiterfassung.forms.ProjectCreationBean" >
  <form-property name = "projectName" type = "java.lang.String" />
</form-bean>

<action
     path="/secureZone/ProcessProjectCreation"
     scope="request"

type="de.subsist.zeiterfassung.controller.actions.CreateProjectDispatchActio
n"
     name="createProjectForm"
     parameter="method" >
  <forward name="Success" path="ZuKS.createProjectDefinition" />
</action>

error message:

The server encountered an internal error (No input attribute for mapping
path /secureZone/ProcessProjectCreation) that prevented it from fulfilling
this request.


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>