tiles-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From PhoenixelRay <simon_bellaun...@web.de>
Subject Struts2/Tiles2 OGNL Problem
Date Fri, 14 Nov 2008 10:16:34 GMT

Hi,

i have a little question because of a Problem I faced with OGNL in
Struts 2. I have tried a lot of things but it didn work. 

OK. I´ve set up a new Struts 2 Project with Tomcat 6.0 and integrated
Tiles 2. I want to use the menuing support of tiles. 
This is the relevant code of the tiles-defs.xml:
------------------------
<definition name="menue" template="/tiles/menue.jsp">
  <put-list-attribute name="myListAttribute">
        <item value="menue.uebersicht" link="uebersicht.action" />
        ...
  </put-list-attribute>
</definition>
------------------------

Here I want to define all sections of the main menue. The value of the
item property should be a ressource key which I have in the
"package.property" file in my project directory (WEB-INF/src/java).  

The code of the the menue.jsp is:
------------------------
<tiles:importAttribute name="myListAttribute" />
        <c:forEach var="item" items="${myListAttribute}">
         ${item.link} <s:property value="${item.value}"/> 
        <br/>
        </c:forEach>
------------------------

This loop should integrate the menu sections. 

The exception I get is:
/tiles/menue.jsp(18,30) According to TLD or attribute directive in tag
file, attribute value does not accept any expressions

Without <s:property/> it would work. 

I think the Problem is that the Struts-Tags dont support EL. Is it
possible to solve this Problem with OGNL? I dont know how I can access
the "item.link" and "item.value" properties with OGNL. Is there a way to
use EL with Stuts 2? 

So many questions. I didnt find a solution in the net for this specific
problem and the OGNL documentation is not very helpfull for me. Maybe
someone can give me a little clue.

Thank you in advance.

Best regards 

Ray
-- 
View this message in context: http://www.nabble.com/Struts2-Tiles2-OGNL-Problem-tp20497807p20497807.html
Sent from the tiles users mailing list archive at Nabble.com.


Mime
View raw message