我试过的
<tabpanel>
<listbox id="usersList" sizedByContent="true" span="true" model="@{users}">
<listhead>
<listheader label="User Name"/>
<listheader label="gender"/>
</listhead>
<listitem self="@{each=users}">
<listcell label="@{user.userName}"/>
<listcell label="@{user.gender}"/>
</listitem>
</listbox>
</tabpanel>
在Java方面:我有ArrayList用户,如果在将用户添加到此列表后单击提交....但我不知道如何在UI方面显示它....有人可以帮助我吗?非常感谢.... im zk新手
您可以使用标签<template>
。尝试以下代码:
<tabpanel>
<listbox id="usersList" sizedByContent="true" span="true" model="${users}">
<listhead>
<listheader label="User Name"/>
<listheader label="gender"/>
</listhead>
<template name="model" var="user">
<listitem>
<listcell label="${user.userName}"/>
<listcell label="${user.gender}"/>
</listitem>
</template>
</listbox>
</tabpanel>
但是,如果您的列表在应用程序运行时发生变化,则可以使用@load(users)
而不是${users}
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句