Thiago, Are you saying the I can use <t:grid ... overrides="prop:xyz"> to get around the problem? Do I just build a list of PropertyOverrides in the page class for that, and does it override all other overrides that the grid normally provides by itself - I'm guessing this behavior is not what I want as I just want to affect rendering for this specific field, < <t:myCustomComponent value="bom.property"/>?
I had started creating my own PropertyEditContext in the component used for my custom type <just in the scenario where it's used in a grid>, but was running into issues with an internal null pointer when I got to validate.render() in my component's beginRender method. What I was trying to do was something along the lines of: boolean pECForGridRequired = (environment.peek(PropertyEditContext.class) == null); PropertyEditContext pECForGrid = null; if (pECForGridRequired){ pECForGrid = createPECForGrid(); environment.push(PropertyEditContext.class, pECForGrid); } ... and mimicking the way the PEC is created when the component is used in a beanEditForm. Is this approach wrong-headed? Regards, Jim. -----Original Message----- From: Thiago H. de Paula Figueiredo [mailto:thiag...@gmail.com] Sent: 23 September 2010 14:11 To: Tapestry users Subject: Re: PropertyEditContext not available from Environment On Thu, 23 Sep 2010 09:25:14 -0300, Jim O'Callaghan <jc1000...@yahoo.co.uk> wrote: > Thanks Thiago. I'll file a JIRA after I come up with a workaround. I > would have thought this was a common enough use case, an editable custom > field in a grid. I was talking about creating a component that does that, not using this functionality. :) By the way, I just remembered about the overrides parameter in Grid. You'll probably don't need to create another component, just make sure the overrides provide the edition block instead of the viewing one. Maybe we could even add a PropertyOverrides implementation that implements that to Tapestry . . . -- 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-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