Unfortunately EditerPersonneAction do extend
DispatchAction (using parameter "do") ! (Otherwise
your solution would be good)

(I answer you personally because I assume such a
message is not useful for the list)

Billy

--- Hubert Rabago <[EMAIL PROTECTED]> wrote:

> It seems that you're trying to prepopulate a form
> with values from the
> DB before showing it to the user.
> 
> So, you have
> 1) call /EditionPersonne to prepopulate the form
> 2) show EditerPersonne.jsp to display the form
> 3) submit the form to /SomePathLikeSubmitPersonne
> 
> If so, you don't need to specify the "form"
> attribute in
> /EditionPersonne.  The "form" attribute identifies
> the input form for
> that Action, to carry the data being submitted to
> that Action.
> 
> Try removing the "scope", "form" and "input"
> attributes to
> /EditionPersonne, and specify them instead on the
> Action to which the
> form will be submitted to.
> 
> On the other hand, if EditerPersonneAction extends a
> DispatchAction
> class, send another message and we'll offer a
> different solution.
> 
> Hubert
> 
> 
> On 7/19/05, William Shief
> <[EMAIL PROTECTED]> wrote:
> > Hello,
> > I'm currently having a problem with the Struts
> > validator.
> > I have a very simple Struts bean
> "EditionPersonneForm"
> > (extending
> > ValidatorForm) associated with an action
> > "EditerPersonneAction" and a
> > JSP form "EditerPersonne.jsp"
> > 
> > [From struts-config.xml]
> >                 <action path="/EditionPersonne"
> > 
> > type="com.myproject.actions.EditerPersonneAction"
> >                         scope="session"
> > name="EditerPersonneForm"
> > 
> > input="/pages/EditerPersonne.jsp"
> >                         parameter="do"
> >                         validate="true">
> >                         <forward
> > name="afficherEditionPersonne"
> > path="/pages/EditionPersonne.jsp"/>
> >                         <forward
> > name="afficherAjoutPersonne"
> > 
> > path="/pages/AjoutPersonne.jsp" />
> >                 </action>
> > [end of listing]
> > 
> > The matter is that the method validate() is called
> > BEFORE the form is
> > displayed. So if the Struts bean is filled in with
> > wrong values at this
> > 
> > very moment, the validator causes an error and
> Struts
> > redirects me to
> > the "input" error page, and the action (which
> > populates the form
> > with the right data from the database) is never
> called
> > !
> > Does anyone have a clue ?
> > Thanks in advance,
> > Billy Bob
> > 
> >
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 
> 


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to