how to dynamically include zul page

1.6k Views Asked by At

I have designed the page as Border layout and in each section I have included different zul pages for different border layout sections. That means for North i have included the header.zul and for south I have included footer.zul in that manner.I have sidebar in the west and it icontans some links for navigation. When each link is clicked, the center content should be changed. Now my question is how do I dynamically include the zul file to the centre area? when each link is clicked?

1

There are 1 best solutions below

0
bidifx On

Executions.getCurrent().createComponents(java.lang.String uri, Component parent, java.util.Map<?,?> arg) is probably the function you're looking for.

You can call it like this:

Executions.getCurrent().createComponents("file.zul", parentContainer, null);

So you attach an event handler to your links. Then you can use above function to create the components from your ZUL files and add them to your center.