It does not matter that you it is loaded in setupRender(). Rending events
happen only during page rendering. Your exception happens during a separate
HTTP request for event handling (see request URL in your logs). Such events
do not trigger page rendering in Tapestry 5. So setupRender() is not
executed in this case. And because collections is not '@Persisted' on each
request is initialised to default value, which is null. Probably you would
move code from setupRender() to onActivate(), so it will be executed for
every request concerning this page.


Cezary


On Fri, Oct 12, 2012 at 4:48 PM, Ken in Nashua <kcola...@live.com> wrote:

>
> Guys, I appreciate the help...
>
> is it possible collection is getting clobbered in between somewhere the
> event ? I mean I walked thru debugger and logged a statement too and saw
> with my eyes that collection is loaded and allocated and established in
>


>     @SetupRender
>     public void setupRender()
>     {
>         itemsPerPage = new Integer("50");
>         try
>         {
>             collection = loadCollection(collectionType);
>         } catch (Exception e)
>         {
>             logger.error("error loading data on collection gallery");
>         }
>     }
>
> so the initialization of my collection variable seems to be happening fine
> and i actually see the entity rendered within the gallery... it runs and
> comes up and is displayed.
>
> I didnt think that persisting this variable was needed beyond it being
> operated as a property on Home.tml (the page) and a parameter in
> Gallery.tml (the component)... so i think i modeled it properly.
>
> I would hate to think Integer is the issue... but changing that doesnt
> seem to shake anything out. But I am starting to think that integer is
> getting clobbered somewhere in the @Property space and tripping up the
> @Property eFrastructure
>
> maybe I need the @Persist ? I will give it a shot but I am just looking
> for some reason here for this...
> maybe I need to stop using Integer ?
>
> I have downloadSources=true in my maven but unable to step thru all of the
> core code
>
> Thanks if you have any ideas on how to shake this out
>

Reply via email to