Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

FormBean - Hidden variable not set

 
Thilothama Green
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I have 2 jsp pages using same Form and same Action Class.
Page contains a list of values and on clicking any one of the list, goes to second page which is a tabbed page.

I am having a hidden variable pageDispatch in all the pages and on submit of any pages's form, I set the dispatch with that particular page's value.

I have my action form bean in session scope. The javascript I use to set the dispatch shows that the value is set(I used alerts). But when in the action, if I try to get that dispatch value, its showing the default value I set for it in the page. What am I missing?

Thanks
 
s penumudi
Ranch Hand
Posts: 113
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I guess your not submitting your form.
 
Thilothama Green
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am submitting the form and I could do some other operations.
 
Pavan Tummala
Ranch Hand
Posts: 74
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How r u setting the hidden property.
I set it using something like this:

document.forms['formName'].action.value = "edit";
formName.submit()
return true;

where action is the hidden form property.
 
Jason Menard
Sheriff
Posts: 6450
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"Thilothama T",

Welcome to JavaRanch. We don't have many rules here, but we do have a naming policy. Please take this opportunity re-read our policy and edit your display name in order to comply. Thanks and we look forward to seeing you around the Ranch.
 
Thilothama Green
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have two jsp pages in a tab structure. One of the pages in the tab works fine for the dispatch function. Only the other page is not working. I found out that not even any javascript is working in that page. Working on it.

Thank you all for your help.

Thilothama.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic