We handled this situation by combining nested tags with the commons
utility:
org.apache.commons.collections.ListUtils.lazyList().
Do a search on lazylist and you will find comments from Arron Bates regarding this.
I'm sure that there are other ways to do that but we had to display lists within lists.
Once I hade a datastructure that used the Lazy list, all my lists were populated from
httprequest info
instead of httpsession:
My controls would render a name like this:
meshListWrapper.meshList[0].creditList[3].creditVo.arTypeCd
Example of a list property in my bean:
/**
* This list will allow repopulation to take place
*/
private List meshList = ListUtils.lazyList(new ArrayList(),
new Factory(){
public Object create(){
return new MeshWebVo();
}
});
At the time I got this going, there was no official documentation on this.
I would love to if anyone else is using this..
hope this helps.
"Matthew Meyer" <[EMAIL PROTECTED]> on 02/06/2003 02:11:25 PM
Please respond to "Struts Users Mailing List"
<[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
cc:
Subject: request scope nested beans
I was wondering if Struts provided any functionality to recieve the
values of nested bean properties back from the view via the request.
For example a simple test jsp I have.
<nested:form action="testDyna">
<nested:iterate property="aList">
<nested:text property='value'/>
</nested:iterate>
<html:submit/>
</nested:form>
generates this source
<form name="TestForm2" method="post" action="/TestApp/test.do">
<input type="text" name="aList[0].value" value="a">
<input type="text" name="aList[1].value" value="b">
<input type="text" name="aList[2].value" value="c">
<input type="submit" value="Submit">
</form>
but with a request scope specified for the action mapping it can't populate
the value attribute after the submit. Is there a different solution to this
besides specifing session scope for all action mappings, or constantly
scrubbing the session?
Thanks,
Matt
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]