You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by d0ng <ag...@gmail.com> on 2009/01/10 10:05:18 UTC

How to use the volatile property of Tapestry5 Loop component?

Hi,
I have a loop component in a form,I want to turn off the state saving logic.
So I set the volatile property to true like this:
<form method="post" t:id="taskForm">
....
<t:if test="transitions">
<t:loop source="transitions" value="transition" volatile="true">
<input type="submit" name="${buttonPrefix}${transition.name}"
value="${transition.name}"/>
</t:loop>
</t:if>
....
</form>

The NullPointerException exception is thrown when I request the page:

Caused by: java.lang.NullPointerException
at
org.apache.tapestry5.corelib.components.Loop.setupForVolatile(Loop.java:321)
at org.apache.tapestry5.corelib.components.Loop.access$100(Loop.java:37)
at org.apache.tapestry5.corelib.components.Loop$2.execute(Loop.java:68)
at org.apache.tapestry5.corelib.components.Loop$2.execute(Loop.java:72)
at
org.apache.tapestry5.corelib.components.Form.executeStoredActions(Form.java:482)

The I set it to false then everything is right.

I do not understand why this is so?

Thanks.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org