我正在使用ZK 3.6.4开展项目。但是我有一个问题,我想在用户点击同一个列表框(同一个列表项)中的按钮时更改litstbox项目的选择状态。因为我想知道selectedItem。我正在阅读zk文档,我可以做到,但使用Zk版本5.0.5+(nonselectableTags)。但我不能为项目规则更改此版本。那么,有一种方法可以用3.6.4模拟这种行为吗?或者你可以给我什么样的建议呢?我非常感谢你的帮助。
这是我的代码。
<listbox
id="listDocAcads" mold="paging" pageSize="2"
model="@{win$composer.academicCollections}"
selectedItem="@{controller.docEntAcad}" >
<listhead>
<listheader
width="30%" label="Name" />
<listheader
width="15%" label="amount" />
<listheader
width="15%" label=" delivered?" />
<listheader
width="20%" label="Importance" />
<listheader
width="20%" label="Document" />
</listhead>
<listitem
self="@{each='docAcad'}" value="docAcad"
style="border:none;">
<listcell
label="@{docAcad.colleByProcess.oDocument.name}" />
<listcell
label="@{docAcad.colleByProcess.amount}" />
<listcell>
<spinner
width="60%" value="@{docAcad.amount}" />
</listcell>
<listcell
label="@{docAcad.colleByProcess.oImportance.name}" />
<listcell ><button id="btnUploadDocument" label="Upload"/> </listcell>
</listitem>
</listbox>
答案 0 :(得分:0)
如果你想忽略按钮和输入,你可以这样做。 nonselectableTags =“按钮,输入”。
<listbox nonselectableTags="button, input">
<listitem><listcell><textbox/></listcell></listitem>
<listitem><listcell><button label="button"/></listcell></listitem>
<listitem><listcell><h:input xmlns:h="native"/></listcell></listitem>
<listitem><listcell><datebox/></listcell></listitem>
</listbox>
nonselectableTags的值应为以逗号分隔的HTML标记。
希望这有帮助!