This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Servlets and the fly likes HELP! JSP doesn't SAVE VALUES to BEAN Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "HELP! JSP doesn Watch "HELP! JSP doesn New topic
Author

HELP! JSP doesn't SAVE VALUES to BEAN

verduka fox
Ranch Hand

Joined: Jan 18, 2001
Posts: 178
I am developing in Websphere Studio Advanced Edition version 3.5 and VAJ Enterprise Edition version 3.5.3. I have developed jsp's in the past but under this configuration I cannot get the jsp to save the values to the bean. This site displays data dynamically; however, there are no input fields for the user. The site uses frames: there is a navigation bar on the left and on the top of the screen. I need to track which element in the vector that the user has selected so I can continue to display information related to this element in the different screens. To do so, I have decided to use hidden fields for these values which are then saved to the bean. I discovered the flaw in my design: since there are no update fields, I do not have any submit buttons and it would not be appropriate to add such a button to the result frame.
Here is my question: How do I save values to the bean if I do not have a submit button? Your help is greatly appreciated!!
jsp:

User (the bean):
janaki samaraweera
Greenhorn

Joined: Jun 20, 2001
Posts: 5
I suppose you can use this method. if you can call this javascript function in somewhere(page onload.unload) then you can save without putting a button
function beforeQuit(){
document.myform.action="List.jsp";
document.myform.submit();
}

Originally posted by verduka fox:
I am developing in Websphere Studio Advanced Edition version 3.5 and VAJ Enterprise Edition version 3.5.3. I have developed jsp's in the past but under this configuration I cannot get the jsp to save the values to the bean. This site displays data dynamically; however, there are no input fields for the user. The site uses frames: there is a navigation bar on the left and on the top of the screen. I need to track which element in the vector that the user has selected so I can continue to display information related to this element in the different screens. To do so, I have decided to use hidden fields for these values which are then saved to the bean. I discovered the flaw in my design: since there are no update fields, I do not have any submit buttons and it would not be appropriate to add such a button to the result frame.
Here is my question: [b]How do I save values to the bean if I do not have a submit button?
Your help is greatly appreciated!!
jsp:

User (the bean):
[/B]

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: HELP! JSP doesn't SAVE VALUES to BEAN
 
Similar Threads
usebean getProperty and setProperty in the same form field
Can't pass changed beans values from one JSP page to another
error occuring while use jsp
Urgent: How to use Indexed Properties
reagarding jsp problem