You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Norman Franke <No...@myASD.com> on 2010/05/29 00:41:45 UTC

T5 Loop Issue

On a query page in my T5.1.0.5  app, I have a loop that is embedded in  
a form. The loop displays the query results in a table with a checkbox  
to allow the user to select a subset of the items. On one page, I keep  
getting database errors as Tapestry tries to  
restoreStateFromStoredClientValue since the object, which came from  
Hibernate, is not an object it can just query. It resulted from a  
query, and is a composite object. It tries to select from this non- 
existent table, which always fails. Since I re-populate the list in  
the onPrepare() call, I'm not sure why it's doing this. The volatile  
option is not use anywhere, and if I tried, I get a NPE anyway.

Even more, odd, if I hit the back button from the error page, then  
submit again, it works! Even odder, on another almost identical page,  
it works just fine.

I try to query the results set in onPrepare, but it dies before it  
even gets there.

Norman Franke
Answering Service for Directors, Inc.
www.myasd.com




Re: T5 Loop Issue

Posted by Norman Franke <no...@myasd.com>.
On May 28, 2010, at 9:15 PM, Thiago H. de Paula Figueiredo wrote:

> On Fri, 28 May 2010 19:41:45 -0300, Norman Franke <No...@myasd.com>  
> wrote:
>
>> Since I re-populate the list in the onPrepare() call, I'm not sure  
>> why it's doing this. The volatile option is not use anywhere, and  
>> if I tried, I get a NPE anyway.
>
> Loop's volatile parameter is deprecated. Use formState="none" instead.


 From the dox, that didn't appear to be an option, just VALUES and  
INTERATION. I think my main issue was the the working version stored  
the query parameters as part of the activation context, whereas the  
broken one wanted it to be submitted from the form. Since onPrepare is  
called before the form data was set, my array was null, so Tapestry  
decided to restore the values from the form. Not very intuitive, but a  
least I have a fix.

Norman Franke
Answering Service for Directors, Inc.
www.myasd.com


Re: T5 Loop Issue

Posted by "Thiago H. de Paula Figueiredo" <th...@gmail.com>.
On Fri, 28 May 2010 19:41:45 -0300, Norman Franke <No...@myasd.com> wrote:

> Since I re-populate the list in the onPrepare() call, I'm not sure why  
> it's doing this. The volatile option is not use anywhere, and if I  
> tried, I get a NPE anyway.

Loop's volatile parameter is deprecated. Use formState="none" instead.

-- 
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,  
and instructor
Owner, Ars Machina Tecnologia da Informação Ltda.
http://www.arsmachina.com.br

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