Thanks for all your help Thiago.  I'm not trying to render all fields in the 
grid as form fields, just the one from my custom component X that's a property 
of bom Y, and a selection of other properties of bom Y that are plain Strings, 
Integers etc., which the grid handles perfectly just using t:param and input 
fields.  I have what I need working by creating a PropertyEditContext in the 
beginRender method of the custom component whenever it is being rendered as 
part of a grid, pushing it to the environment, and popping it in the 
afterRender method.  Hopefully this doesn't set off any alarm bells.

I like the idea of being able to use the overrides to achieve something 
similar, though it does put the onus on the developer to make the override 
available as a property in every page where a relevant grid occurs <I think>.  
I'll have a look into it when I'm not so stretched for time.  Thanks again.

Regards,
Jim.

-----Original Message-----
From: Thiago H. de Paula Figueiredo [mailto:thiag...@gmail.com] 
Sent: 23 September 2010 17:27
To: Tapestry users
Subject: Re: PropertyEditContext not available from Environment

On Thu, 23 Sep 2010 12:50:47 -0300, Jim O'Callaghan  
<jc1000...@yahoo.co.uk> wrote:

> Thiago,

Hi!

> Are you saying the I can use <t:grid ... overrides="prop:xyz"> to get  
> around the problem?

Yes.

> 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

Yes. You don't need a list of PropertyOverrides, just one. Grid (more  
specifically, GridCell) asks to the override if it provides a block for  
rendering the property (overrides.getOverrideBlock(blockId). If it returns  
null, it uses the BeanBlockSource service to get one.

> - 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"/>?

Use a <p:xxxCell> or <t:parameter name="xxxCell"> tag. I thought you were  
trying to render all grid cells as form fields.

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

Reply via email to