Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > struts and form validation

Reply
Thread Tools

struts and form validation

 
 
Scott Phelps
Guest
Posts: n/a
 
      05-04-2005
I have two forms that I submit both do validation, one keeps the form
entries on errors one does not.

The only thing that I can see that is different (maybe im doing something
wrong) is that I load a bean in one and not another.

ie
first one that does not keep entries on errors

<html:form action="/entry" name="curr" type="org.my.struts..myForm">


the other that does

<html:form action="/entry">

How do I make the first keep form entries on errors, and still be able to
load entries from the session?

Thanks




 
Reply With Quote
 
 
 
 
Wendy Smoak
Guest
Posts: n/a
 
      05-04-2005
"Scott Phelps" <(E-Mail Removed)> wrote:

> I have two forms that I submit both do validation, one keeps the form
> entries on errors one does not.


What do the <action> mappings in struts-config.xml look like?
I'm guessing that one has session scope, and the other, request scope.

--
Wendy S


 
Reply With Quote
 
 
 
 
Scott Phelps
Guest
Posts: n/a
 
      05-06-2005

"Wendy Smoak" <(E-Mail Removed)> wrote in message
news:d5bd4r$7i0$(E-Mail Removed)...
> "Scott Phelps" <(E-Mail Removed)> wrote:
>
>> I have two forms that I submit both do validation, one keeps the form
>> entries on errors one does not.

>
> What do the <action> mappings in struts-config.xml look like?
> I'm guessing that one has session scope, and the other, request scope.
>
> --
> Wendy S
>
>


No they are both session. Could the differenct be that one is using a bean
to populate the fields, the other is not? but even so wouldn't the fields be
popluated on the finding of the error?

Thanks


 
Reply With Quote
 
Wendy S
Guest
Posts: n/a
 
      05-07-2005
> "Scott Phelps" <(E-Mail Removed)> wrote:
>
> No they are both session. Could the differenct be that one is using a bean
> to populate the fields, the other is not? but even so wouldn't the fields
> be popluated on the finding of the error?
>


They're both using a bean to populate the fields... one is using the form
bean that [I assume] you configured in struts-config.xml, and the other is
using the one that you put in the <html:form> tag.

Without seeing the <action> mappings from struts-config, it's a waste of
time for me to keep guessing. Also, what URLs are you visiting to view the
forms? Are you doing anything interesting in the Action code?

--
Wendy





 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Dynamic Form Beans and Validation in Struts D. Mantelos Java 9 05-03-2007 02:39 PM
Struts Validation Framework: suppressing startup output from validation.xml javadude Java 0 02-16-2005 05:37 PM
Struts validation for combine form fields validation Sumith Mathur Java 0 09-23-2004 06:26 PM
Form Validation Problem...Persisiting form fields on validation failure. bnp Javascript 4 05-12-2004 12:16 PM
form validation problem with velocity-struts and errortool Leo Gaggl Java 0 04-05-2004 10:38 AM



Advertisments