You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@tiles.apache.org by "Thomas Champagne (JIRA)" <ji...@apache.org> on 2011/05/06 10:51:03 UTC
[jira] [Created] (TILES-523) El-Support is not available for
element in list-attribute
El-Support is not available for element in list-attribute
---------------------------------------------------------
Key: TILES-523
URL: https://issues.apache.org/jira/browse/TILES-523
Project: Tiles
Issue Type: Improvement
Components: tiles-el
Affects Versions: 2.2.2
Reporter: Thomas Champagne
I test the following configuration :
{code:xml}
<definition name="test.el" template="/WEB-INF/tiles/test.jsp">
<put-attribute name="test" expression="test = ${mytest}"/>
<put-list-attribute name="listAttributeTest">
<add-attribute expression="listAttributeTest = ${mytest}"/>
</put-list-attribute>
<put-list-attribute name="listMenuTest">
<item value="Test" link=${mytest}"/>
</put-list-attribute>
</definition>
{code}
The _test.el_ template have three attribute :
The first attribute _test_ is evaluated correctly. No problem for this attribute.
The second _listAttributeTest_ contains a list attribute. The first attribute in the list have an el expression but it is not evaluated because in the source code, the attribute value is displayed.
The third attribute _listMenuTest_ contains a list attribute with bean item. In the source code, bean's properties are never evaluated.
Do you think is it possible to evaluate all properties in the tile defintion ?
Thomas
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (TILES-523) El-Support is not available for
element in list-attribute
Posted by "Thomas Champagne (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/TILES-523?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13029927#comment-13029927 ]
Thomas Champagne commented on TILES-523:
----------------------------------------
So, I change the definition of my menu and I use attribute tag to define it instead of item or bean tag :
<definition name="test.el" template="/WEB-INF/tiles/test.jsp">
<put-attribute name="test" expression="test = ${mytest}"/>
<put-list-attribute name="listAttributeTest">
<add-attribute expression="listAttributeTest = ${mytest}"/>
</put-list-attribute>
<put-list-attribute name="listMenuTest">
<add-attribute expression="Home,/"/>
<add-attribute expression="My books,/${user.id}"/>
</put-list-attribute>
</definition>
And in the JSP Page :
<ul>
<tiles:importAttribute name="listMenuTest" scope="page"/>
<c:forEach var="menu" items="${listMenuTest}">
<c:set var="menuString"><tiles:insertAttribute value="${menu}"/></c:set>
<c:set var="menuArray" value="${fn:split(menuString, ',')}"/>
<li><a href="<c:url value="${menuArray[1]}"/>">${menuArray[0]}</a></li>
</c:forEach>
</ul>
Thanks for help.
> El-Support is not available for element in list-attribute
> ---------------------------------------------------------
>
> Key: TILES-523
> URL: https://issues.apache.org/jira/browse/TILES-523
> Project: Tiles
> Issue Type: Improvement
> Components: tiles-el
> Affects Versions: 2.2.2
> Reporter: Thomas Champagne
>
> I test the following configuration :
> {code:xml}
> <definition name="test.el" template="/WEB-INF/tiles/test.jsp">
> <put-attribute name="test" expression="test = ${mytest}"/>
> <put-list-attribute name="listAttributeTest">
> <add-attribute expression="listAttributeTest = ${mytest}"/>
> </put-list-attribute>
> <put-list-attribute name="listMenuTest">
> <item value="Test" link=${mytest}"/>
> </put-list-attribute>
> </definition>
> {code}
> The _test.el_ template have three attribute :
> The first attribute _test_ is evaluated correctly. No problem for this attribute.
> The second _listAttributeTest_ contains a list attribute. The first attribute in the list have an el expression but it is not evaluated because in the source code, the attribute value is displayed.
> The third attribute _listMenuTest_ contains a list attribute with bean item. In the source code, bean's properties are never evaluated.
> Do you think is it possible to evaluate all properties in the tile defintion ?
> Thomas
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (TILES-523) El-Support is not available for
element in list-attribute
Posted by "Thomas Champagne (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/TILES-523?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13029864#comment-13029864 ]
Thomas Champagne commented on TILES-523:
----------------------------------------
Ok, it works with :
<tiles:importAttribute name="listAttributeTest"/>
<c:forEach items="${listAttributeTest}" var="attributeTest">
attributeTest = <tiles:insertAttribute value="${attributeTest}"/><br/>
</c:forEach>
Good news !
But, It doesn't work for bean because the item tag can be replaced with a bean tag :
<put-list-attribute name="listMenuTest">
<bean classtype="org.apache.tiles.beans.SimpleMenuItem">
<set-property property="value" value="Test" />
<set-property property="link" value="${mytest}" />
</bean>
</put-list-attribute>
> El-Support is not available for element in list-attribute
> ---------------------------------------------------------
>
> Key: TILES-523
> URL: https://issues.apache.org/jira/browse/TILES-523
> Project: Tiles
> Issue Type: Improvement
> Components: tiles-el
> Affects Versions: 2.2.2
> Reporter: Thomas Champagne
>
> I test the following configuration :
> {code:xml}
> <definition name="test.el" template="/WEB-INF/tiles/test.jsp">
> <put-attribute name="test" expression="test = ${mytest}"/>
> <put-list-attribute name="listAttributeTest">
> <add-attribute expression="listAttributeTest = ${mytest}"/>
> </put-list-attribute>
> <put-list-attribute name="listMenuTest">
> <item value="Test" link=${mytest}"/>
> </put-list-attribute>
> </definition>
> {code}
> The _test.el_ template have three attribute :
> The first attribute _test_ is evaluated correctly. No problem for this attribute.
> The second _listAttributeTest_ contains a list attribute. The first attribute in the list have an el expression but it is not evaluated because in the source code, the attribute value is displayed.
> The third attribute _listMenuTest_ contains a list attribute with bean item. In the source code, bean's properties are never evaluated.
> Do you think is it possible to evaluate all properties in the tile defintion ?
> Thomas
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (TILES-523) El-Support is not available for
element in list-attribute
Posted by "Thomas Champagne (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/TILES-523?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13029854#comment-13029854 ]
Thomas Champagne commented on TILES-523:
----------------------------------------
test = <tiles:insertAttribute name="test"/><br/>
<tiles:importAttribute name="listAttributeTest"/>
<c:forEach items="${listAttributeTest}" var="attributeTest">
attributeTest = ${attributeTest}<br/>
</c:forEach>
<tiles:importAttribute name="listMenuTest"/>
<c:forEach items="${listMenuTest}" var="menuTest">
menuTest = ${menuTest}<br/>
</c:forEach>
Thanks for your quick response !
> El-Support is not available for element in list-attribute
> ---------------------------------------------------------
>
> Key: TILES-523
> URL: https://issues.apache.org/jira/browse/TILES-523
> Project: Tiles
> Issue Type: Improvement
> Components: tiles-el
> Affects Versions: 2.2.2
> Reporter: Thomas Champagne
>
> I test the following configuration :
> {code:xml}
> <definition name="test.el" template="/WEB-INF/tiles/test.jsp">
> <put-attribute name="test" expression="test = ${mytest}"/>
> <put-list-attribute name="listAttributeTest">
> <add-attribute expression="listAttributeTest = ${mytest}"/>
> </put-list-attribute>
> <put-list-attribute name="listMenuTest">
> <item value="Test" link=${mytest}"/>
> </put-list-attribute>
> </definition>
> {code}
> The _test.el_ template have three attribute :
> The first attribute _test_ is evaluated correctly. No problem for this attribute.
> The second _listAttributeTest_ contains a list attribute. The first attribute in the list have an el expression but it is not evaluated because in the source code, the attribute value is displayed.
> The third attribute _listMenuTest_ contains a list attribute with bean item. In the source code, bean's properties are never evaluated.
> Do you think is it possible to evaluate all properties in the tile defintion ?
> Thomas
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (TILES-523) El-Support is not available for
element in list-attribute
Posted by "Antonio Petrelli (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/TILES-523?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13029842#comment-13029842 ]
Antonio Petrelli commented on TILES-523:
----------------------------------------
EL not evaluated in add-attribute: it is a bug, you're right.
About <item>, this is no more supported and it is maintained only for backward compability, only Tiles 1.x existing features work.
> El-Support is not available for element in list-attribute
> ---------------------------------------------------------
>
> Key: TILES-523
> URL: https://issues.apache.org/jira/browse/TILES-523
> Project: Tiles
> Issue Type: Improvement
> Components: tiles-el
> Affects Versions: 2.2.2
> Reporter: Thomas Champagne
>
> I test the following configuration :
> {code:xml}
> <definition name="test.el" template="/WEB-INF/tiles/test.jsp">
> <put-attribute name="test" expression="test = ${mytest}"/>
> <put-list-attribute name="listAttributeTest">
> <add-attribute expression="listAttributeTest = ${mytest}"/>
> </put-list-attribute>
> <put-list-attribute name="listMenuTest">
> <item value="Test" link=${mytest}"/>
> </put-list-attribute>
> </definition>
> {code}
> The _test.el_ template have three attribute :
> The first attribute _test_ is evaluated correctly. No problem for this attribute.
> The second _listAttributeTest_ contains a list attribute. The first attribute in the list have an el expression but it is not evaluated because in the source code, the attribute value is displayed.
> The third attribute _listMenuTest_ contains a list attribute with bean item. In the source code, bean's properties are never evaluated.
> Do you think is it possible to evaluate all properties in the tile defintion ?
> Thomas
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (TILES-523) El-Support is not available for
element in list-attribute
Posted by "Antonio Petrelli (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/TILES-523?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13029931#comment-13029931 ]
Antonio Petrelli commented on TILES-523:
----------------------------------------
For more help please use the Tiles users mailing list:
http://tiles.apache.org/mail.html
> El-Support is not available for element in list-attribute
> ---------------------------------------------------------
>
> Key: TILES-523
> URL: https://issues.apache.org/jira/browse/TILES-523
> Project: Tiles
> Issue Type: Improvement
> Components: tiles-el
> Affects Versions: 2.2.2
> Reporter: Thomas Champagne
>
> I test the following configuration :
> {code:xml}
> <definition name="test.el" template="/WEB-INF/tiles/test.jsp">
> <put-attribute name="test" expression="test = ${mytest}"/>
> <put-list-attribute name="listAttributeTest">
> <add-attribute expression="listAttributeTest = ${mytest}"/>
> </put-list-attribute>
> <put-list-attribute name="listMenuTest">
> <item value="Test" link=${mytest}"/>
> </put-list-attribute>
> </definition>
> {code}
> The _test.el_ template have three attribute :
> The first attribute _test_ is evaluated correctly. No problem for this attribute.
> The second _listAttributeTest_ contains a list attribute. The first attribute in the list have an el expression but it is not evaluated because in the source code, the attribute value is displayed.
> The third attribute _listMenuTest_ contains a list attribute with bean item. In the source code, bean's properties are never evaluated.
> Do you think is it possible to evaluate all properties in the tile defintion ?
> Thomas
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (TILES-523) El-Support is not available for
element in list-attribute
Posted by "Antonio Petrelli (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/TILES-523?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13029857#comment-13029857 ]
Antonio Petrelli commented on TILES-523:
----------------------------------------
Ok it does not work this way. Try with:
<tiles:insertAttribute value="${attributeTest}" />
> El-Support is not available for element in list-attribute
> ---------------------------------------------------------
>
> Key: TILES-523
> URL: https://issues.apache.org/jira/browse/TILES-523
> Project: Tiles
> Issue Type: Improvement
> Components: tiles-el
> Affects Versions: 2.2.2
> Reporter: Thomas Champagne
>
> I test the following configuration :
> {code:xml}
> <definition name="test.el" template="/WEB-INF/tiles/test.jsp">
> <put-attribute name="test" expression="test = ${mytest}"/>
> <put-list-attribute name="listAttributeTest">
> <add-attribute expression="listAttributeTest = ${mytest}"/>
> </put-list-attribute>
> <put-list-attribute name="listMenuTest">
> <item value="Test" link=${mytest}"/>
> </put-list-attribute>
> </definition>
> {code}
> The _test.el_ template have three attribute :
> The first attribute _test_ is evaluated correctly. No problem for this attribute.
> The second _listAttributeTest_ contains a list attribute. The first attribute in the list have an el expression but it is not evaluated because in the source code, the attribute value is displayed.
> The third attribute _listMenuTest_ contains a list attribute with bean item. In the source code, bean's properties are never evaluated.
> Do you think is it possible to evaluate all properties in the tile defintion ?
> Thomas
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Closed] (TILES-523) El-Support is not available for element
in list-attribute
Posted by "Antonio Petrelli (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/TILES-523?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Antonio Petrelli closed TILES-523.
----------------------------------
Resolution: Invalid
It works as intended, <item> and <bean> have been not upgraded to be used with EL, just as designed.
> El-Support is not available for element in list-attribute
> ---------------------------------------------------------
>
> Key: TILES-523
> URL: https://issues.apache.org/jira/browse/TILES-523
> Project: Tiles
> Issue Type: Improvement
> Components: tiles-el
> Affects Versions: 2.2.2
> Reporter: Thomas Champagne
>
> I test the following configuration :
> {code:xml}
> <definition name="test.el" template="/WEB-INF/tiles/test.jsp">
> <put-attribute name="test" expression="test = ${mytest}"/>
> <put-list-attribute name="listAttributeTest">
> <add-attribute expression="listAttributeTest = ${mytest}"/>
> </put-list-attribute>
> <put-list-attribute name="listMenuTest">
> <item value="Test" link=${mytest}"/>
> </put-list-attribute>
> </definition>
> {code}
> The _test.el_ template have three attribute :
> The first attribute _test_ is evaluated correctly. No problem for this attribute.
> The second _listAttributeTest_ contains a list attribute. The first attribute in the list have an el expression but it is not evaluated because in the source code, the attribute value is displayed.
> The third attribute _listMenuTest_ contains a list attribute with bean item. In the source code, bean's properties are never evaluated.
> Do you think is it possible to evaluate all properties in the tile defintion ?
> Thomas
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (TILES-523) El-Support is not available for
element in list-attribute
Posted by "Antonio Petrelli (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/TILES-523?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13029846#comment-13029846 ]
Antonio Petrelli commented on TILES-523:
----------------------------------------
Oh wait a minute.
How do you insert attributes in your template?
> El-Support is not available for element in list-attribute
> ---------------------------------------------------------
>
> Key: TILES-523
> URL: https://issues.apache.org/jira/browse/TILES-523
> Project: Tiles
> Issue Type: Improvement
> Components: tiles-el
> Affects Versions: 2.2.2
> Reporter: Thomas Champagne
>
> I test the following configuration :
> {code:xml}
> <definition name="test.el" template="/WEB-INF/tiles/test.jsp">
> <put-attribute name="test" expression="test = ${mytest}"/>
> <put-list-attribute name="listAttributeTest">
> <add-attribute expression="listAttributeTest = ${mytest}"/>
> </put-list-attribute>
> <put-list-attribute name="listMenuTest">
> <item value="Test" link=${mytest}"/>
> </put-list-attribute>
> </definition>
> {code}
> The _test.el_ template have three attribute :
> The first attribute _test_ is evaluated correctly. No problem for this attribute.
> The second _listAttributeTest_ contains a list attribute. The first attribute in the list have an el expression but it is not evaluated because in the source code, the attribute value is displayed.
> The third attribute _listMenuTest_ contains a list attribute with bean item. In the source code, bean's properties are never evaluated.
> Do you think is it possible to evaluate all properties in the tile defintion ?
> Thomas
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira