Meaningless Drivel is fun!*
The moose likes Struts and the fly likes boolean form bean member Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "boolean form bean member" Watch "boolean form bean member" New topic
Author

boolean form bean member

Chris Pat
Ranch Hand

Joined: Aug 27, 2005
Posts: 156
Hello
I have a form with a field phase1of2 (yes I probably should do it as a multi-step wizard, just could never apprehend that fast enough) that I set to "true". The form bean member has the setter and the is implemented. However when I test in the my action it comes up as null. Now every form bean getter comes up as null. This worked yesterday. How can this happen? Semantic logic disappears with these technologies at times. I am creating a new instance of the form bean in the action. In my struts-config.xml it has the correct form bean class assigned to the action. Ideas? tia.
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

I'm not sure why you'd created a new form bean instance in your action; the framework normally handles form creation.

That aside, w/o any code it's kinda difficult to diagnose the issue; if you're creating an instance in the action, and the form bean itself initializes its properties, and the property is coming up null in the same action that's creating it, I'd say you've borked something up pretty good and would look at a deployment issue.
Chris Pat
Ranch Hand

Joined: Aug 27, 2005
Posts: 156
Sorry for the intrusion, my stupid mistake. I didnt sufficiently de-evolve my thoughts and I was trying to implement two steps with placeholder method calls that returned a null. I must be stupider next time, so I can build up the software to do what I want semantically.
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

If we got money for stupid mistakes we'd all be rich :)

(Well, *I* would, anyway!)
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: boolean form bean member