setupRender() doesn't get called in an AJAX request.

        
http://jumpstart.doublenegative.com.au/jumpstart/examples/ajax/whatiscalledandwhen

so celebrityService was null.  You can either:

- @Persist it. That makes the page stateful, which is best avoided.

- use Firebug or Web inspector to figure out what the event is that's being 
requested, then create a handler method for it and instantiate celebrity 
service in it.

- remove @Property from celebrityService and try 

        @Cached
        public CelebrityService getCelebrityService() {
                celebrityService = new CelebrityService();
        }

That's all can think of right now.

Cheers,

Geoff

On 23/01/2013, at 7:32 AM, mwrohde wrote:

> Ok, I got it working and my sanity is returning.  I'm not sure I've done it
> the best way and I welcome any comments.
> 
> My previous suppositions were on the right track.  Tapestry wasn't getting
> the correct GridDataSource.  In fact, it wasn't finding one at all, so was
> using NullGridDataSource.
> 
> In the tml I have /t:source="celebrityService"/.  In the java I have private
> /CelebrityService celebrityService;/
> 
> I also have a setupRender method:
> void setupRender() {
>        if (celebrityService == null)
>            celebrityService = new CelebrityService();
>    }
> 
> setupRender was being called.  However, it seems that tapestry was also
> calling getCelebrityService, which I had no implemented.  So, I added a
> getCelebrityService() method that does exactly what setupRender() does and
> it started working.
> 
> 
> 
> --
> View this message in context: 
> http://tapestry.1045711.n5.nabble.com/ANN-JumpStart-gets-jQuery-DataTables-example-tp5715816p5719427.html
> Sent from the Tapestry - User mailing list archive at Nabble.com.
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
> 


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

Reply via email to