-
FEATURED COMPONENTS
First time here? Check out the FAQ!
Can anybody tell me how can i get the velue of 'aaply' attribute of a Window?
e.g.
<window apply="com.Test"> <button label="butt" id="b"/> </window> public class Test extends GenericForwardComposer{ } public void onClick$b(Event e) { //here how can i get the value of 'apply' attribute of the Window? }
@sanhaq,
public void onClick$b(Event e) {
e.getTarget()
}
If you would concentrate of your logic than have a look here .
Search for the helper class BaseCtrl.java and study the code and the thread.
Stephan
PS: help to prevent the global warming by writing cool software.
thanks.
But actually i want only the value of apply attribute of Window.
That means here "com.Test".So can i get this from this onClick$b() method?
Having the same problem, because I need the composer of a child component (where it's not "this"). Solved it for the moment with putting the composer in an attribute of the component, so that component.getAttribute("composer") will return the original composer (or, to be more exact, the list of composers). But probably there is a much better way, just haven't found it yet...
Edit: Ok, Components.getComposer() seems to be a better way, but I am still curious why it only returns one Composer, because more than one can be applied to any Component...
Asked: 2009-06-29 10:02:01 +0800
Seen: 995 times
Last updated: Jun 08 '15