-
FEATURED COMPONENTS
First time here? Check out the FAQ!
I'm using ZK 5.0.5.
Our project follows the MVC paradigm where each zul file has a window as main container and that exploits "wire variables" and "auto forward".
In this context, I have a BorderLayout inside the window that serves as the main container of a file of Zul. I would like to size the BorderLayout so that it has the same window size, which in turn are proportional to those of the screen.
To accomplish this I have tried to use all the solutions described in the thread http://www.zkoss.org/forum/listComment/11037/1/20 without luck.
In any case, I think that it might be the case to modify the BorderLayout component to improve its control.
What do you think about it?
Please, somebody help me to solve the problem of proportional sizing of BorderLayout.
Thanks a lot in advance, best regards,
Giordano
You can have a borderlayout or any component as a root component and wire variables in the controller as you are used to with the window. The window just makes it's own ID space, which might be usefull.
Thanks for your answer.
If I understand it, you suggest the following:
1. eliminate the window as root component of the file zul
2. do become the borderlayout the root component of the zul file
3. its controller will extend the BorderLayout, not the window that no longer exists
I'm very sad: I've tried it but not work.
it should work:
not tested:
public class YourBorderLayoutController extends Borderlayout implements AfterCompose { . . . @Override public void afterCompose() { Components.wireVariables(this, this); // auto wire variables Components.addForwards(this, this); // auto forward } }
Hi giordan,
I guess you use:
<borderlayout use="com.my.MyBorderLayout" ...>
I thimk you should better use Composers
<borderlayout apply="com.my.MyMainComposer" ...>
Asked: 2011-02-07 01:32:24 +0800
Seen: 168 times
Last updated: Feb 08 '11