You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by amboss <am...@o2.pl> on 2007/01/25 11:40:19 UTC
Tiles 2 - problem with putList tag.
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.
--
Best regards,
Piotr
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: Tiles 2 - problem with putList tag.
Posted by "David H. DeWolf" <dd...@apache.org>.
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.
>
Re: Tiles 2 - problem with putList tag.
Posted by Joe Germuska <jo...@germuska.com>.
In doing some other work on the Tiles tags, I found some problems with how
the PutListTag is implemented.
I fixed these (SVN revision r495431 and r495722, see also
http://svn.apache.org/viewvc/tiles/trunk/tiles-core/src/main/java/org/apache/tiles/taglib/PutListTag.java?view=log
)
I didn't build a new snapshot, because these changes also involved changing
the names of some of the tags and committers were not 100% united that the
changes were correct.
(see
http://www.nabble.com/-Tiles2--JSTL-functions-for-Tiles-taglib--t2961079.html
)
If you build from SVN and change some JSP tag names, you will probably be
ok, although I am not a regular user of the PutList tag; I just found these
issues while working on the rename and testing the changes.
Questions about unreleased code like Tiles2 are generally better aimed at
the struts-dev list (or, now, the recently created dev@tiles.apache.orglist).
I'll stir things up over there and see if people are game for a new SNAPSHOT
build based on those changes.
Joe
On 1/25/07, amboss <am...@o2.pl> 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.
>
> --
> Best regards,
>
> Piotr
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>
--
Joe Germuska
Joe@Germuska.com * http://blog.germuska.com
"The truth is that we learned from João forever to be out of tune."
-- Caetano Veloso