I tried it and it didn't work.  Thanks anyway!

Mike

-----Original Message-----
From: Dan Hensgen [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, June 05, 2002 4:37 AM
To: Struts Users Mailing List
Subject: Re: 2 problems that are just driving me CRAZY


2nd problem:

I'm assuming you are doing some validation or error handling in the action 
itself.  I'm not sure if it's convenient (or even possible) for your 
application, but you might have better luck moving all validation into the 
ActionForm for those mappings so that when the Action is performed (assuming

the form validated ok), there is no reason for it not to work (and if it 
doesn't, treat it as a fatal error).

-Dan

> Hi,
> 
> I'm having two problems which are sure to drive me out of my mind if I
> don't
> find the solution soon.  If you can help with either one of these, I
> would
> appreciate it.
> 
> 1) For my problem, let's say I have 2 actions with 2 forms called
> ActionA,
> ActionB, FormA, and FormB.  ActionA is going to use FormA and ActionB
> is
> going to use FormB.  But, for some reason, the jsp which displays
> FormB
> actually tries to display FormA.  I know this because FormA has an
> attribute
> called transactionMonth and FormB has an attribute called
> monthSelection.
> When I try to run this, I get an exception which tells me that there is
> no
> getter for monthSelection.  However, if I go into my jsp and change it
> to
> transactionMonth (from Form A), it works without a hitch.  ActionB does
> get
> FormB though.  I know this because if I do a "servlet.log(form);" in
> ActionB, I get the full pathname for FormB.  This problem occurs when
> I
> forward to ActionB/FormB (not when I do a submit, I haven't tried that
> yet).
> 
> 2) My second problem I've had trouble with longer.  It has to do with
> ActionErrors and using the <html:errors/> tag.  In one branch of my
> webapp,
> this works just fine.  But, for no reason that I can see, along
> another
> branch of my webapp, the error message is not displayed.  I do the
> exact
> same thing in both cases: I detect an error, add it to the errors
> collection, do a SaveErrors method call, and forward using getInput(). 
> In
> both cases, the input form is re-displayed, but in one case the error
> message is displayed and in the other case it's not.  The only other
> discrepency that I see, which is also annoying, is that in the case
> where
> the error does display, the input fields get cleared and they are all
> blank.
> In the case where the error message is not dispalyed, the input fields
> contain the values which were entered prior to the submit.
> 
> Thanks for your help,
> 
> Mike Witt
> 
> --
> To unsubscribe, e-mail:  
> <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>
> 

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

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

Reply via email to