The selector mixen works with a selector binding I wrote. The goal is for ${selector:id} to return the client id of the component with the id passed to selector. The binding also supports 'this' for an id which returns the client id of the containing component that supports getClientId(). So to make that work there is a ComponentClassTransformWorker that does the following:
public void transform(ClassTransformation transformation, MutableComponentModel model) { List<TransformMethod> methods = transformation.matchMethods( new Predicate<TransformMethod>() { @Override public boolean accept(TransformMethod method) { if ( "getClientId".equals(method.getName()) ) { return true; } return false; } }); if ( methods == null || methods.size() == 0 ) { return; } model.addMixinClassName(Selector.class.getName(),"before:*"); } The selector mixin works with selector binding thru a per thread service that implements a stack. The top of the stack should be the mixin of the currently rendering component that implements getClientId. So the mixin is added to all components that support getClientId. The mixin pushes itself onto the stack in beginRender and pops the stack in afterRender. The before:* is important so the stack is correct when the other mixins render. This way the selector binding can call getClientId on the component represented by the top of the stack. In the example above the selector binding returns the form when I think it should be the select. --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org