Hi

Maybe you should have a look at the BeanBlockOverrideSource service.

2010/6/16 Jim O'Callaghan <jc1000...@yahoo.co.uk>

> Thanks for the reply Uli.  I see how I can do this on a case by case basis
> but what I was hoping for was to contribute a block / renderer / validator
> /
> translator that were all associated with entities of type Entity B, and
> then
> wherever they were included an entity being rendered using a BEF / Bean
> Display, the relevant block would automatically be rendered - is this
> approach possible?  Having to manually supply <t:parameter ... for every
> page would not be a very attractive option.
>
> Regards,
> Jim.
>
> -----Original Message-----
> From: Ulrich Stärk [mailto:u...@spielviel.de]
> Sent: 16 June 2010 14:28
> To: Tapestry users
> Subject: Re: Custom Edit Block
>
> You will want to apply the NonVisual annotation to your id field and use
> the
> BeanDisplay component
> for displaying the contents in your display scenario. I'm not sure right
> now
> whether the NonVisual
> annotation will make the BeanEditForm render a hidden input field though...
> If it doesn't you have
> to something like
>
> <t:beaneditform object="entity">
>   <t:parameter name="id">
>     <t:hidden t:id="id" value="entity.id"/>
>   </t:parameter>
> </t:beaneditform>
>
> as described on the page you were referring to.
>
> HTH,
>
> Uli
>
> On 16.06.2010 15:11, Jim O'Callaghan wrote:
> > I'm trying to put together an edit / display block for an entity (Entity
> B)
> > where for simplification the entity contains an id and a desc field
> >
> >     -  in an edit scenario I want the rendered output to have a hidden
> field
> > for the id and an input field for the desc field, so that upon submission
> I
> > can use the id to update an existing entity using the desc field
> >
> >     - in a display scenario I just need to display a readonly text field
> for
> > the desc
> >
> >
> >
> > I want to be able to use this block system-wide in bean edit forms and
> bean
> > displays where the form is being rendered for Entity A which contains a
> 1:1
> > Entity B.
> >
> >
> >
> > I'm looking at the example at
> > http://tapestry.apache.org/tapestry5/guide/beaneditform.html but drawing
> a
> > bit of a blank on how some tml to render my hidden id field and my text
> desc
> > field for edit, and my text desc field only for display fits in with the
> > code.  Can anyone point to a more comprehensive online example or let me
> > know if what I am doing is something achievable?  I'm not sure if Google
> > just isn't cooperating today or I am being stupid ...
> >
> >
> >
> > Regards,
> >
> > Jim.
> >
> >
>
> ---------------------------------------------------------------------
> 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
>
>


-- 
Regards,
Christophe Cordenier.

Developer of wooki @wookicentral.com

Reply via email to