Browser size adaptability issues
3 Mar 2010 23:03:12 GMT
4 Mar 2010 05:16:17 GMT
4 Mar 2010 05:16:17 GMT
I think you should declare inline="true" in your component definition.
take a try.
4 Mar 2010 16:21:55 GMT
4 Mar 2010 16:21:55 GMT
Hi
Thanks for the suggestion. I tried it but without success.
Actually I think the role of this attribute (inline) is rather to specify whether the component has to be considered as a macro-component or not.
Cheers
MC
7 Mar 2010 19:29:14 GMT
7 Mar 2010 19:29:14 GMT
how do you catch the size changed event?
8 Mar 2010 02:39:05 GMT
8 Mar 2010 02:39:05 GMT
My plan was to use event onSize associated with windows or/and onOpen associated with splitters
10 Mar 2010 20:00:05 GMT
10 Mar 2010 20:00:05 GMT
How about this?
Client Watches
18 Mar 2010 21:08:15 GMT
18 Mar 2010 21:08:15 GMT
I had a look to Client Watches. Sounds like it is what I need, but couldn't work out how to use this... Can anybody give me a clue?
Thanks!
ZK - Open Source Ajax Java Framework
Hi there,
With the code below the window expends and shrinks according to the browser size (code for processtable.zul and processdetails.zul are given further):
<?component name="ProcessTable" macroURI="macros/processtable.zul" ?>
<?component name="ProcessDetails" macroURI="macros/processdetails.zul" ?>
<zk>
<window id="main" border="none" sizable="true" width="100%"
height="100%">
<borderlayout height="665px">
<north>
<ProcessTable id="processtablecomp" />
</north>
<south size="42%">
<ProcessDetails id="processdetailscomp" />
</south>
</borderlayout>
</window>
</zk>
But, because I want also to catch event produced when the user resizes the bottom window to accordingly enlarge the one at the top, I came up with the other solution:
<?component name="ProcessTable" macroURI="macros/processtable.zul" ?>
<?component name="ProcessDetails" macroURI="macros/processdetails.zul" ?>
<zk>
<window id="main" border="none" sizable="true" width="100%"
height="100%">
<box align="stretch" >
<ProcessTable id="processtablecomp" />
<splitter id="s" />
<ProcessDetails id="processdetailscomp" />
</box>
</window>
</zk>
Unfortunetly, the window still expends but does not shrink anymore....
Can anybody help me?
Thanks
<!-- processdetails.zul -->
<window id="processdetails" contentStyle="overflow:auto">
<hbox align="stretch" spacing="0">
<grid fixedLayout="true" hflex="1" >
<columns sizable="true">
<column label="Attribute" />
<column label="Value" />
</columns>
<rows>
<row>
<label value="Name" />
<textbox id="nameT" value="" disabled="true" />
</row>
<row>
<label value="Original language" />
<textbox id="originalLanguageT" value=""
disabled="true" />
</row>
<row>
<label value="Domain" />
<textbox id="domainT" value="" disabled="true" />
</row>
<row>
<label value="Version" />
<textbox id="versionT" value="" disabled="true" />
</row>
<row>
<label value="Ranking" />
<textbox id="rankingT" value="" disabled="true" />
</row>
<row>
<label value="Creation date" />
<datebox id="creationDateD" disabled="true"
format="dd/MM/yyyy hh:mm:ss" />
</row>
<row>
<label value="Last update" />
<datebox id="lastUpdateD" disabled="true"
format="dd/MM/yyyy hh:mm:ss" />
</row>
<row>
<label value="Export" />
<listbox id="exportL" rows="1" mold="select"
disabled="true">
<listitem label="Choose format" />
<!-- list built from the database + pdf, svng, png, ... -->
</listbox>
</row>
</rows>
</grid>
<window id="graphicW" closable="true" hflex="1" >
<image id="processImage" src="img/petRego.png" width="100%" visible="true"/>
<label id="pushToSign" visible="false"> To see more, please sign in. </label>
</window>
</hbox>
</window>
<!-- processtable.zul -->
<window id="processTableWindow" contentStyle="overflow:auto" >
<paging id="pg" pageSize="11"/>
<grid id="processSummariesGrid" mold="paging" paginal="${pg}" >
<columns sizable="true">
<column width="3%">
<button width="20px" id="revertSelectionB"
image="img/flag-10x10.png"
tooltiptext="click here to revert selection" />
</column>
<column width="0">
<checkbox id="processSummaryCB" visible="false" />
</column>
<column id="columnId" label="Id" width="3%" />
<column id="columnName" label="Name" />
<column sort="auto" label="Original language" />
<column sort="auto" label="Domain" />
<column sort="auto" label="Ranking" />
<column sort="auto" label="Latest version" />
</columns>
<rows id="processSummariesRows">
</rows>
</grid>
</window>