I just noticed that the page I referred to is missing some things:

If you just want to display (output) a property, inject the PropertyOutputContext environmental service instead of the PropertyEditContext. Also you might want to put your block on a page called AppPropertyDisplayBlocks instead of AppPropertyEditBlocks (in the end this doesn't matter since you can configure that in your contribution to the BeanBlockSource service). Acquiring the actual value of your property is then done with (DateTime) context.getPropertyValue().

Uli

Am 04.11.2009 14:36 schrieb Ulrich Stärk:
That's because Tapestry doesn't know how to display org.joda.time.DateTime. Provide a block that knows how to display a DateTime on some page and contribute that block to the BeanBlockSouce service (see [1] for an example).

Uli

[1] http://tapestry.apache.org/tapestry5.1/guide/beaneditform.html

Am 04.11.2009 14:20 schrieb Martin Reurings:
Hi everybody,

I've been using T5 quite a while now but only recently started making serious use of the Grid and BeanEditor (finally giving way to my misgivings concerning some of the html-output in favor of development speed). But, now that I've started using Grid I ran into something I can't quite grasp. I have a Pojo with a reasonable set of getters and setters, however, Grid only accepts 'public Long getId()' to be a property, while 'public DateTime getDateCreated()' is ignored?!?

I wouldn't mind as much if it were just one field, but since we use 'org.joda.time.DateTime' a lot in our project I figured I'd be better of figuring out what's going on and solve it now, rather than later... Any ideas what might be going on? Any links / concepts I should start looking at / googling for, to solve this elegantly?

Oh, and before I forget, this is how I declared my grid:
@Component(id = "pojos", parameters = {"source=ucw.pojos","row=pojo","add=dateCreated"})
   private Grid _pojosComponent;

Where ucw.pojos is returning a List of Pojo's and for testing purposes I was storing the pojo in a property so I could test if I was able to generate output of the dateCreated even though the Grid was ignoring it, which turned out successful:
<p:dateCreatedCell>
 ${pojo.dateCreated}
</p:dateCreatedCell>

Cheers,

Martin

---------------------------------------------------------------------
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


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

Reply via email to