• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Problem in Setting Value Explicitly

 
Ranch Hand
Posts: 101
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Ranchers,
I am facing problem with a field (<html:select property="ooCode" name="OoForm" >) .
I am setting the value of ooCode explicitly( by calling SetOoCode()) in OoAction1.And
OoAction1 forwards to OoAction2.But in OoAction2 the value of ooCode set in OoAction1
is lost.It is showing the value of ooCode from jsp.Kindly guide me ,so that 2nd Action can
get the value set in 1st action without doing any modification in second action.
 
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
probably it wont lose . whether you implement reset method in your ActionForm ?
 
subhasish nag
Ranch Hand
Posts: 101
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
yes Reset method is there.But it is not applied for that perticular field. And the field value is taking in 2nd action is from the jsp .
Is the problem is with struts-config?
Is the name of scope has any relation with that?
for ref:
<action path="/OoAction1"
type="claim.OoAction1"
name="GenClaimForm"
scope="session" validate="false">
 
subhasish nag
Ranch Hand
Posts: 101
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Can somebody guide in this matter??
 
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What's the definition of the second action?
 
subhasish nag
Ranch Hand
Posts: 101
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
public class SecondClass extends Action
 
David Newton
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
...

Not the signature, the definition in struts.xml.
 
subhasish nag
Ranch Hand
Posts: 101
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi David,
the defination in struts-config is given below

<action path="/SecondClass"
type="claim.SecondClass"
name="GenClaimForm"
scope="session" validate="false">
<forward name="success" path="/resources/jsp/roclaim/claim/policy.jsp" contextRelative="true" />
Pl let me know if anything more you need to know.
 
David Newton
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I think we'll need to see the entire workflow: how the form is first accessed, the processing the action does to it, and how the second action is accessed.
 
I love a good mentalist. And so does this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic