0

Get apply object from component

asked 2010-02-04 09:37:03 +0800

shumy gravatar image shumy
244 1

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.

delete flag offensive retag edit

1 Reply

Sort by ยป oldest newest

answered 2010-02-04 10:45:41 +0800

shumy gravatar image shumy
244 1

updated 2010-02-04 10:47:12 +0800

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);
}

link publish delete flag offensive edit
Your reply
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow

RSS

Stats

Asked: 2010-02-04 09:37:03 +0800

Seen: 303 times

Last updated: Feb 04 '10

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More