[
http://www.stripesframework.org/jira/browse/STS-817?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12663#comment-12663
]
Peter Mahoney commented on STS-817:
-----------------------------------
I have come across a new problem with expressions being evaluated multiple
times:
<c:set var="words" value="${actionBean.words}" />
<s:layout-render name="wrapper.jsp">
<s:layout-component name="first">
FIRST
</s:layout-component>
<s:layout-component name="second">
SECOND
</s:layout-component>
</s:layout-render>
wrapper.jsp:
<s:layout-definition>
<s:layout-component name="first" />
<s:layout-component name="second" />
</s:layout-definition>
actionBean.words will be evaluated three times - once correctly and the once
per layout-component definition, which is strange. Obviously this is bad,
because one of the main reasons for using the <c:set> is to avoid duplicate
expensive calls.
> Stack Overflow when using a layout with an existing component name
> ------------------------------------------------------------------
>
> Key: STS-817
> URL: http://www.stripesframework.org/jira/browse/STS-817
> Project: Stripes
> Issue Type: Bug
> Components: Tag Library
> Affects Versions: Release 1.5.6
> Reporter: Peter Mahoney
> Assignee: Ben Gunter
> Priority: Minor
> Fix For: Release 1.5.7, Release 1.6
>
>
> I have used this pattern successfully in 1.5.3, but it fails in
> 1.5.6-SNAPSHOT:
> Page:
> <s:layout-render name="testlayout.jsp">
> <s:layout-component name="pageContent">
> HELLO
> <s:layout-render name="testinclude.jsp">
> <s:layout-component name="pageContent">
> INCLUDED
> </s:layout-component>
> </s:layout-render>
> </s:layout-component>
> </s:layout-render>
> testlayout.jsp:
> <s:layout-definition>
> LAYOUT
> ${pageContent}
> </s:layout-definition>
> testinclude.jsp:
> <s:layout-definition>
> INCLUDE:
> ${pageContent}
> </s:layout-definition>
> The outout I expect is:
> LAYOUT HELLO INCLUDE: INCLUDED
> The output I get is:
> LAYOUT HELLO INCLUDE: HELLO INCLUDE: HELLO INCLUDE: ... repeated until a
> stack overflow
> In this simple test case, renaming the included layout component fixes this
> problem, but in my actual case it then fails to include anything. I am not
> sure why that is, but suspect the cause is the same as in this simple case.
--
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
------------------------------------------------------------------------------
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here
http://p.sf.net/sfu/sfd2d-msazure
_______________________________________________
Stripes-development mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/stripes-development