データバインディングを使用して、ZK で編集可能なテーブル (リストボックス) を実装しようとしています。
<listbox model="@bind(vm.beanList)" selectedItem="@bind(vm.selectedBean)"
mold="paging" pageSize="5">
<listhead>
<!-- ... -->
</listhead>
<template name="model">
<listitem>
<listcell>
<!-- ... -->
</listcell/>
<listcell>
<combobox width="100%" inplace="true"
model="@load(vm.otherBeanList)"
value="@load(each.property) @converter(vm.propertyConverter)"
itemRenderer="@load(vm.propertyComboItemRenderer)"
onSelect="@command('propertySelected')"
onFocus="@command('cellEditorSelected', item=self)"/>
</listcell>
</listitem>
</template>
</listbox>
テーブル列の 1 つがコンボボックスです。ユーザーはそれをクリックして、ドロップダウン リストから選択した値を変更できます。すべてのコンボボックスは1つのモデルを使用するため...そしてモデルはSelectableインターフェースを実装しているため、ユーザーはすべての行の各コンボボックスで選択した値を直接変更します。だから私は何とか各コンボボックスに別々のモデルを提供する必要があります...または何らかの方法でモデルを複製します...または完全に方法を変更します。
どんなアドバイスも役に立ち、価値があります。
ありがとう。