-
FEATURED COMPONENTS
First time here? Check out the FAQ!
Is there any way to get the apply object from a component?
I what to use Executions.createComponents(...) to create a component, and then get the apply object to interact with them.
To solve this problem I have used the Events.sendEvent(...), but I what to use this as a MVP architecture, returning a interface for the view.
Thanks in advance.
I can't find any method on the Component for this, but... I have managed a workaround for this.
Using a GenericComposer for all my Composers with:
comp.setVariable("this", this, false); //reserved alias...
Now I can use on my create method:
public static <T> T create(String uri){ Component comp = Executions.createComponents(...); return (T) comp.getVariable("this", false); }
Asked: 2010-02-04 09:37:03 +0800
Seen: 303 times
Last updated: Feb 04 '10