Status

Blog::Calendar

« April 2009 »
SunMonTueWedThuFriSat
   
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
17
18
19
20
21
22
23
24
25
26
27
28
29
30
  
       
Today
XML

Blog::Navigation

Blog::Editing

Bookmarks::Blogroll

Blog::Referers

Today''s Page Hits: 427

Other sites

Google Analytics

Powered by Roller Weblogger.
All | JBoss&Seam | JSF | ZK | Music | General | Java
Main | Next day (Apr 17, 2009) »
20090416 Thursday April 16, 2009
ZK, A tricky example to connect size between window and other components.

Very tricky, use data binder can even link size of a window with other components.

try following example in zkdemo , click overlapped, resize the window.

<?init class="org.zkoss.zkplus.databind.AnnotateDataBinderInit"?>
<zk>
    <button label="overlapped" onClick="winActif.doOverlapped()" />
    <label id="info" />
    <window visible="false" title="Les actifs" id="winActif"
        border="normal" closable="true" left="300px" top="100px" width="200px"
        height="200px"
        onClose="self.setVisible(false); event.stopPropagation();"
        onSize='info.setValue(winActif.getWidth()+","+winActif.getHeight());'
        sizable="true">
    </window>
    <hbox style="background-color:red"
        width="@{winActif.width,load-when=winActif.onSize}"
        height="@{winActif.height,load-when=winActif.onSize}">
        Connected Box
    </hbox>
</zk>
Copyright (C) 2003, 閣樓貓的五四三 (About Cat)