• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Liutauras Vilda
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Scott Selikoff
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
  • Frits Walraven
Bartenders:
  • Stephan van Hulst
  • Carey Brown

form bean value not getting

 
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I am using struts 1.2
My Jsp code contains two radio button
which changes action path which i m going to submit.




and my javascript function setValueOfRecordType() is as which i call on onclick of radio button




Now i have a <html:button onclick="submit1(this.form)">
and submit1() is as



and form tag is like this
<html:form action="navigateFinancialBusinessPlanDispatchAction.do?method=refJspForAdd" >


if i use form.submit();
my action not getting called which set in setValueOfRecordType()
action is directed to form action not my specified

if i use document.forms[0].submit();
it propery direct action but i m not getting my form bean values(hidden textbox) On my jsp.
Means i m not getting form bean values

Please help me. why this happened??


 
Ranch Hand
Posts: 5575
Eclipse IDE Windows XP Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Carefully Choose One Forum
 
Ranch Hand
Posts: 312
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Oh! I read "from bean value not getting" and I thought I was going to meet Joda but world is not perfect!

Anyway, it would be better to put here all your form code, are you specifying the form id?

I don't understand why you pass the form value to submit1 if you are not going to use it.

What's the value of the action if you form.submit();?

What's the value of the hidden fields?
 
Sheriff
Posts: 67752
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Please be sure to ask Struts questions in the Struts forum. I have moved this post there for you.
 
Forget Steve. Look at this tiny ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic