Thank you Jonathan, that's very helpful - I must have seen the bug before as 
I've voted on it already, but I can't recall it. I hadn't even considered 
trying a mixin. Composition I'd discounted early because I was adding a single 
new parameter and never reconsidered after being unable to extend.

>From Howard's reply to the issue it looks like he has his reasons for them 
>being package private. The thing is, for what I need to do, I can't use a 
>mixin or extension because I still can't get at the Iterator driving the loop 
>to do a test for the last iteration. All I thought I needed to do was to be 
>able to override the @AfterRender after() method and call the superclass 
>version which returns the Boolean I need to expose. Unfortunately that would 
>be too late as the body would already have rendered.

I think my only option to avoid copying all the T5 Loop code into my own is to 
use composition and compare source.size() with index from the Loop component 
since that's the only thing exposed.

To be honest I think the standard loop component would benefit from first & 
last Boolean parameters that are set to true for first and last iterations 
repectively. Anyone else agree, or is this an unusual need?

Thanks,

Andy.

> -----Original Message-----
> From: Jonathan Barker [mailto:[EMAIL PROTECTED]
> Sent: 23 September 2008 18:29
> To: 'Tapestry users'
> Subject: RE: Overriding a render phase method
>
> First, have a look at:
>
> https://issues.apache.org/jira/browse/TAP5-173
>
> and then vote for it.
>
> Sorry, no pearls of wisdom beyond that.
>
>
> > -----Original Message-----
> > From: Blower, Andy [mailto:[EMAIL PROTECTED]
> > Sent: Tuesday, September 23, 2008 12:44
> > To: 'Tapestry users'
> > Subject: RE: Overriding a render phase method
> >
> > Sorry to 'bump' this, but I'd really like some guidance/opinions.
> >
> > > -----Original Message-----
> > > From: Blower, Andy
> > > Sent: 17 September 2008 11:30
> > > To: 'Tapestry users'
> > > Subject: Overriding a render phase method
> > >
> > > From the T5 documentation:
> > >
> > > "When a sub-class overrides an render phase method of a base class,
> the
> > > method is only invoked once, along with any other base class
> methods.
> > > The subclass can change the implementation of the base class method
> via
> > > an override, but can't change the timing of when that method is
> > > invoked. See TAPESTRY-2311
> > <https://issues.apache.org/jira/browse/TAPESTRY-2311>."
> > >
> > > I want to extend the Loop component to add a 'last' parameter
> that's
> > > true for the last iteration of the loop, and false otherwise.
> > > Unfortunately when I extend the T5 Loop component and try to
> override
> > > after() so I can set the Boolean (change the implementation like
> the
> > > docs suggest), it cannot be overridden because the method is
> package
> > > private. All of the members of the T5 Loop component are private
> and
> > > there's no public accessors for the ones I need.
> > >
> > > So, anyone any ideas how I can do this? The only thing I can think
> is
> > > asking Howard to make the render phase methods public or protected
> so
> > > they can be overridden. Either that or I copy the entire loop
> component
> > > code into my own - ugh.
> > >
> > > Thanks,
> > >
> > > Andy
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to