You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tiles.apache.org by "David H. DeWolf" <dd...@apache.org> on 2007/01/25 13:27:43 UTC

Re: Tiles 2 - problem with putList tag.

It may not have been announced to the user community yet (we're still 
getting things like our infrastructure and website up to snuff), but 
Tiles has graduated to a Top Level Project.  Because of this, we now 
have our own mailing lists.

I'm moving this discussion to users@tiles.apache.org, please continue it 
there.


David

amboss wrote:
> Hi,
> 
> I have problem using putList tag on jsp page. Namely I`m trying to use definition that looks like this:
>   <definition name="tilestest.layout.list" template="/listLayout.jsp">
>     <putList name="testlist">
>         <add value="listItem0" type="string"/>
>         <add value="listItem1" type="string"/>
>         <add value="listItem2" type="string"/>
>     </putList>
>   </definition>
> On a page whose contains code:
> <tiles:insertDefinition name="tilestest.layout.list">
>     <tiles:putList name="testList">
>         <tiles:add value="item_00" type="string"/>
>         <tiles:add value="item_01" type="string"/>
>         <tiles:add value="item_02" type="string"/>
>         <tiles:add value="item_03" type="string"/>
>         <tiles:add value="item_04" type="string"/>
>     </tiles:putList>
> </tiles:insertDefinition>
> Unfortunately this cause some problems which results in exception in jboss logs.
> org.apache.jasper.JasperException caused by:
> java.lang.NullPointerException
> org.apache.tiles.taglib.PutListTag.release(PutListTag.java:60)
> org.apache.jasper.runtime.TagHandlerPool.release(TagHandlerPool.java:146)
> 
> Layout page looks like:
> <tiles:importAttribute name="testlist"/>
> <ul>
>     <c:forEach var="item" items="${testlist}">
>         <li><c:out value="${item}" /></li>
>     </c:forEach>
> </ul>
> 
> This problem occurs only when I`m trying to change values on the list in the jsp page. It works just fine when I`m using values form the definition in xml or I use  my own ViewPreparer to change default values.
> 
> Could you please help me with this issue?
> 
> I`m using tiles2 snapshot on jboss-4.0.3SP1 with java 1.5.0_6 on Linux box.
>