File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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 Java Interview Guide this week in the Jobs Discussion 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: 6529

See my reply in this thread

Junilu - [How to Ask Questions] [How to Answer Questions]
I agree. Here's the link:
subject: dynamic indexed properties
It's not a secret anymore!