Google Answers Logo
View Question
 
Q: hyperlink to submit a form in struts ( No Answer,   0 Comments )
Question  
Subject: hyperlink to submit a form in struts
Category: Computers
Asked by: seena1-ga
List Price: $11.00
Posted: 13 Apr 2006 21:37 PDT
Expires: 18 Apr 2006 18:44 PDT
Question ID: 718757
I have a JSP page with
1)some required fields (which are validated using Validator framework )
2) a hyper link "Add " (which fires an action) which  takes us to a
new page in the parent window(no pop up)
3)and a "Submit" button(which takes me to some other page through an Action).
WHAT I NEED IS:
As soon as I press "add" link it should take me to the new
page(through the Action class) and once we are through with filling
fields in second jsp and press a return button , I come back to my
first page with the some new information(which was entered in second
page) being displayed in first page in a summarized form and now if i
press "submit" button , then validations should take place.
WHAT ACTUALLY IS HAPPENING:
As soon as i press the hyper link,the validator framework is activated
and since the form bean is not updated (because submit button not
clicked as yet and hyperlink by default can only fire an action but
doesn't update the form bean fields) it says that required fields are
not entered(even though i enter data in it)and i can't get past the
first page.
My hyper link looks like
<a href="<c:url value='someAction.do'><c:param name='editIndex'
value='${maxBooks}'/></c:url>" > Add Book</a>
I have tried adding javascript code but somehow doesn't work.
My application uses Struts framework

Clarification of Question by seena1-ga on 13 Apr 2006 22:47 PDT
The data entered by user in first page should not be lost when the
user comes back to the same page after filling in fields of the second
page.

Regarding the design:
the user is forwarded from one JSP to other only through Action.
Answer  
There is no answer at this time.

Comments  
There are no comments at this time.

Important Disclaimer: Answers and comments provided on Google Answers are general information, and are not intended to substitute for informed professional medical, psychiatric, psychological, tax, legal, investment, accounting, or other professional advice. Google does not endorse, and expressly disclaims liability for any product, manufacturer, distributor, service or service provider mentioned or any opinion expressed in answers or comments. Please read carefully the Google Answers Terms of Service.

If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you.
Search Google Answers for
Google Answers  


Google Home - Answers FAQ - Terms of Service - Privacy Policy