I got round this by Munky Patching AbstractTextField so that final Binding defaultTranslate() {...}
becomes protected Binding defaultTranslate() {...} and overriding it in my subclass: @Override protected Binding defaultTranslate() { String description = String.format("default translator, 'teacherKey' of %s", resources.getCompleteId()); return new InvariantBinding(resources.getLocation(), FieldTranslator.class, description) { @Override public Object get() { return fieldTranslatorSource.createTranslator(resources, "teacherKey"); } }; } Is there any reason for the default translate to be package protected AND final?? is it okay if I make a JIRA asking for it to be protected scope and non-final? (It's a 9 character change!) Steve. -- Steve Eynon ------------------------------- "If at first you don't succeed, so much for skydiving!" On 25 January 2013 01:26, Steve Eynon <steve.ey...@alienfactory.co.uk> wrote: > Here's a puzzler... > > I've extended AbstractTextField and I want to set the translate > @Parameter from within my subclass. Given this parameter is private in > the superclass, how may I do it? > > I went as far as making a mixin to set a bound translate parameter on > setupRender, e.g. > > @BindParameter > private FieldTranslator<Object> translate; > > But that gave this error: > > Failure writing parameter 'translate' of component > Binding InvariantBinding[default translator, parameter value is read-only. > > Due to the defaultTranslate in AbstractTextField being a Binding. > > final Binding defaultTranslate() {...} > > Anyone any ideas? > > Steve. --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org