On Thu, 01 Nov 2012 12:06:55 -0200, membersound <memberso...@web.de> wrote:

HI,

Hi!

Grid doesn't care what kind of object you pass to its source parameter, as long as it is a GridDataSource or something that can be coerced to it (like Collections).

t:grid source="service.objects" row="service.object"

Notice you're passing the objects property to source, not the service.

Using a service property as a row variable for Grid is something very dangerous, as usually services are singletons. Avoid doing that.


class Page{
  @Inject
  @Property
  private ObjectService service;
}

class ObjectService {
  private List objects;
  private Object object;
}

I'm trying this, but maybe I'm doing something wrong. At least I always get
an exception:
Render queue error in BeginRender[admin/Page:grid.rows.gridcell]: Object
cannot be cast to ObjectService

This is probably not your real code, so we cannot say what's wrong with that, and the error message doesn't match the presented code and template at all.

--
Thiago H. de Paula Figueiredo

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

Reply via email to