This week's book giveaway is in the Big Data forum.
We're giving away four copies of Elasticsearch in Action and have Radu Gheorghe & Matthew Lee Hinman on-line!
See this thread for details.
The moose likes Struts and the fly likes dynamic indexed properties Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Elasticsearch in Action this week in the Big Data forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "dynamic indexed properties" Watch "dynamic indexed properties" New topic

dynamic indexed properties

Janis Olex

Joined: Aug 21, 2003
Posts: 12
So what is standard approach of Struts framework to add dynamically some properties to the FormBean?
My FormBean has "skills" properties which is List!
I have "Add Skill" button on my form which I want to add one element to this form! The problem is that each time I redirect to the page constructor is called for my FormBean (which is logical as it's lifecycle is one request) and I can't add those skills as the next time Struts will seek for my added skills property it won't find it as it is recreated on each construction of this FormBean!
How can I make the FormBean remember it's collection?
Also how do I fill up FormBean before it shows up with some data from my persistence layer?

-----<br />Programmers are tools to convert cofein into code.
Junilu Lacar

Joined: Feb 26, 2001
Posts: 5508

See my reply in this thread

Junilu - [How to Ask Questions] [How to Answer Questions]
rocket mass heater kickstarter
subject: dynamic indexed properties