asked
2014-08-15 03:44:24 +0800
giovanni910 1 ● 2 Hello Friends,
I want to have two validaton methode in one zul. One using a class validation and the others using methode in my viewModel. I separate the two with two different form id in my zul. The first one that using the class validation is working properly, but the other one isn't.
Can u help me out? Here is my zul code.
<zk>
<window title="${execution.attributes.pageInfo}"
sclass="square black" mode="modal" width="1000px"
apply="org.zkoss.bind.BindComposer"
viewModel=" @id('vm') @init('ui.viewmodel.MyViewModel')"
validationMessages="@id('vmsgs')">
<grid
form="@id('fx') @load(vm.masKarDto) @save(vm.masKarDto, before='save')
@validator('ui.common.KaryawanValidator')">
<columns>
<column width="130px" />
<column />
<column width="150px" />
<column width="130px" />
<column />
<column />
</columns>
<rows>
<row>
<label value="KODE CABANG" />
<cell colspan="2">
<textbox width="200px"
value="@bind(fx.kdprs)" />
<label style="color:red" value="@load(vmsgs['errorFind1'])" />
</cell>
<label value="KODE JABATAN" />
<cell colspan="2">
<combobox form="@id('fy') @load(vm.masKarDto) @save(vm.masKarDto, before = 'save') @validator(vm.karyawanValidator)"
model="@load(vm.masJabatanDtos)"
selectedItem="@bind(fy.masJabatanDto)">
<template
name="model">
<comboitem
label="@load(each.nmjab)" value="@bind(each.kdjab)" />
</template>
</combobox>
<label style="color:red" value="@load(vmsgs['errorFind3'])" />
</cell>
</row>
</rows>
</grid>
</window>
</zk>