Executions.createComponents vs include

18691 1 10 129

Orignial message at:
https://sourceforge.net/forum/message.php?msg_id=3605305

By: jim_bo_lisa

Lesson learned. If you are using the <include src="foo.zul", null, null> You will not be able to get references to the fellow components of your page or parent window via the following Path.getComponent() method call.

Component component = Path.getComponent("/fooWindowId");

What I had to do was use the following Executions.createComponents call so the above getComponent() call would work and I could reference all of the fellow page components:

<zscript>
(Window) Executions.createComponents("/foo.zul", null, null); </zscipt>

Thought I'd share.
Jim

delete retag edit

10 Replies

18691 1 10 129

Orignial message at:
https://sourceforge.net/forum/message.php?msg_id=3605801

By: tomyeh

pandukish
68 1 1 4

Can you please suggest me that is there any possibility to call a flow controller action instead of action.

Example :

Executions.createComponents("modCompany", tabpannel, null);

Where "modCompany" is the Spring Web Flow controller.

Regards,
Kishore

PeterKuo
481 2

@pandukish

Executions.createComponents doesn't support such parameter.

pandukish
68 1 1 4

May I know is there any possibility.

PeterKuo
481 2

@pandukish
You should try to make "modCompany" a kind of parameter that Executions.createComponents support.

ridams
6

Executions.createComponents

SparkySpider
444 1 3

Hang on hang on, you guys have lost me.

I'm using include files to manage all "pages" within my application. Are you saying that instead of using an include file, I should use Executions.createComponents(...);

Every page I have (.zul) is backed by a GenericForwardComposer, so I usually just say:

incInclude.setSrc("page2.zul") and the rest is done for me.

How would I mimic a similar situation without using include files?

Thanks,

Mark

gganassin
540 6
http://www.hybris.com/

Tbh, instead of the include... i always prefere the fulFill attribute:

<div fulfill="=~./yourcontext/yourFile.zul" />

if you want to load something under the package web.yourcontext.
So you can always decide when or when not to brake the parent SpaceID.
Gio

Steva77
1014 3
http://www.research.softe...

Oh, great... so basically the result is the same (i.e. including another page) but with <include> I break SpaceID and might suffer a bit to manage further UI interactions (I know, I used it) whereas with <div fulfill="..." .../> you do not break anything... how nice, lesson learnt!
Thanks,
S

SparkySpider
444 1 3

Awesome!

[hide preview]