aspose file tools*
The moose likes Struts and the fly likes problem in forms.. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "problem in forms.." Watch "problem in forms.." New topic
Author

problem in forms..

Himanshu Rawat
Ranch Hand

Joined: Nov 27, 2005
Posts: 141
hi ppl,
the problem is like this..

I have a 2 fields in jsp page (text:- where user will enter something ,
and a menu from which it will select) and a link (click) below it.
These are not in a <html:form>. Is there any way when i click on link, values entered by the user in 2 fields should go to respective ActionForm classs where i can set the values and can further use in ActionClass.

plzz tell me how to do it??? urgently needed.

thanks


rawat
SCJP 1.4
poornima balagopal
Ranch Hand

Joined: Dec 02, 2003
Posts: 83
Hi
Since your fields are not there inside the <html:form> i dont think you will be able to get those in the respective action class using ActionForm.
If you want to get these values without keeping these fields inside <html:form> tag, have hidden fields for the same and get the values in the action class and set to the form object if there are properties to hold the values.
If you do this you can get these values in your next page using the form bean.
Himanshu Rawat
Ranch Hand

Joined: Nov 27, 2005
Posts: 141
thanx poornima...i finally did it...without using form ...bt did it dirty way...

used javascript for tat and called that form class...
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: problem in forms..
 
Similar Threads
One Form with Many Links (Each has Its Specifics)
How to Read Values From Read only Text field.
Portlet redirect
retaining value in java script
set req attr in jsp from a text field