Re: How to get current element in mixin

2014-08-29 Thread Thiago H de Paula Figueiredo
There's another solution, but it just works when the component is a ClientElement: @MixinAfter public class MyMixin { @InjectContainer private ClientElement clientElement; void afterRender(MarkupWriter writer) { Element element = writer.getElementById(

Re: How to get current element in mixin

2014-08-29 Thread Lance Java
@MixinAfter public class MyMixin { void afterRender(MarkupWriter writer) { List children = writer.getElement().getChildren(); if (!children.isEmpty()) { Element lastChild = (Element) children.get(children.size() - 1); doStuff(lastChild); } } }

How to get current element in mixin

2014-08-29 Thread Michael
I need a mixin which can be attached to different elements (with and without body). The mixin wraps original element with another and adds some classes to the original. How I can get current element while render? I'd use writer.getElement() in render body but its not triggered in components with em