Example 3 below is having some unexpected output:
The action bean test.MyActionBean contains a list of strings (List<String>
stringList) and when included on the page will display the list of strings.
Example 1 ( This works correctly )
<stripes:layout-definition>
<stripes:url var="myUrl" beanclass="test.MyActionBean"
prependContext="false" >
<stripes:param name="stringList[0]" value="Value1" />
<stripes:param name="stringList[1]" value="Value2" />
</stripes:url>
<jsp:include page="${myUrl}"/>
</stripes:layout-definition>
***** EXAMPLE 1 OUTPUT:
Value1
Value2
***********
Example 2 ( This works correctly )
<stripes:layout-definition>
<stripes:url var="myUrl2" beanclass="test.MyActionBean"
prependContext="false" >
<stripes:param name="stringList[0]" value="Value3" />
</stripes:url>
<jsp:include page="${myUrl2}"/>
</stripes:layout-definition>
***** EXAMPLE 2 OUTPUT:
Value3
***********
Example 3 ( This does not work as expected ..... )
<stripes:layout-definition>
<stripes:url var="myUrl" beanclass="test.MyActionBean"
prependContext="false" >
<stripes:param name="stringList[0]" value="Value1" />
<stripes:param name="stringList[1]" value="Value2" />
</stripes:url>
<jsp:include page="${myUrl}"/>
<stripes:url var="myUrl2" beanclass="test.MyActionBean"
prependContext="false" >
<stripes:param name="stringList[0]" value="Value3" />
</stripes:url>
<jsp:include page="${myUrl2}"/>
</stripes:layout-definition>
***** EXAMPLE 2 OUTPUT:
Value3
Value2
***********
It seems that the second call to the test.MyActionBean doesnt create a new
instance - the values from the first call are still contained in the action
bean.
How do I make this so it either:
a. Creates a new instance of the action bean at the second call in example
3?
b. Empties the stringList List before populating w. the params passed in the
second call in example 3?
------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
Stripes-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/stripes-users