您的位置:首页 > 其它

ZK3.0.4发布

2008-03-28 11:48 260 查看
新功能介绍:
1、

<include src="/another.zul" progressing="true"/>

include组件多了一个progressing属性,可以在往包含页面跳转的时候显示进度条

<include src="/WEB-INF/mypage?arg=something"/>

以前传递参数的方式,在页面取Executions.getCurrent().getParameter("arg")

<include src="/WEB-INF/mypage" some="${expr}" another="${expr2}"/>

新版本可以传递非字符串参数,很好的功能。在页面通过以下方式获取对象:

Executions.getCurrent().getAttribute("some");
Executions.getCurrent().getAttribute("another");


2、Grid/Listbox/Tree 支持 fixed layout 概念
如果你想Grid/Listbox/Tree列的宽度不会被cell内容过长而改变,你只需要设置fixedLayout属性为true就可以了。换句话说,Grid/Listbox/Tree列的宽度就是你最开始设定的值,而不会被改变。
a、fixedLayout属性默认是false.
b、 如果所有的列宽都没有设定,Grid/Listbox/Tree的宽度将平均分配到每列

<listbox id="listbox" width="240px" fixedLayout="true">
<listhead sizable="true">
<listheader width="80px" label="name" sort="auto" />
<listheader width="80px" label="gender" sort="auto" />
<listheader width="80px" label="gender" sort="auto" />
</listhead>
<listitem>
<listcell label="MaryLonggggggggggggggggggggggggggggg" />
<listcell label="FEMALE" />
<listcell label="FEMALE1" />
</listitem>
<listitem>
<listcell label="John" />
<listcell label="MALE" />
<listcell label="MALE1" />
</listitem>
</listbox>


3、组件支持word-wrap
在cell里显示长文本换行是一个令人头痛的问题,3.0.4版本里可以为那些显示长文本的组件设置sclass="word-wrap"来解决这个问题

4、分页条可以在listbox上下部同时显示

<listbox mold="paging" pagingPosition="both">
...
</listbox>



5、Grid/Listbox 支持固定的分页组件
以前当Grid/Listbox 有滚动条的时候,分页组件也会随着内容滚动。3.0.4 版本解决了这个问题。

<window>
<zscript>
List items = new org.zkoss.zkdemo.userguide.BigList(1000); //a big list of Integer
</zscript>
<listbox mold="paging" pagingPosition="both" height="150px" width="200px">
<listitem forEach="${items}">
<listcell label="${each}-1"/>
<listcell label="${each}-2"/>
</listitem>
</listbox>
</window>



6、Datebox 支持更多的日期格式

<zk>
<zscript>
String[] formats = {"MM/dd/yy G", "MM.dd.yy D", "MMM dd, yy d",
"w dd/MM/yy", "W dd-MM-yy", "F MM.dd.yyyy"};
</zscript>
<hbox forEach="${formats}">
<datebox format="${each}"/>
${each}
</hbox>
</zk>

阅读更多
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: