<z:row>
<z:label value="${message(code:'paymentMode.subject.label',default:'Subject')}" />
<z:bandbox onChanging="@command('searchSubject',subject=event.value,subjectBox=subjectBox)" id="subjectbd" name="subjectbd" autodrop="true" >
<z:bandpopup>
<z:listbox id="subjectBox" name="subjectBox" height="300px" width="310px" mold="paging" autopaging="true" model="@load(vm.slist)" onSelect="subjectbd.value=self.selectedItem.label; subjectbd.close();">
<z:listhead>
<z:listheader label="付款方式" />
</z:listhead>
</z:listbox>
</z:bandpopup>
</z:bandbox>
</z:row>
@NotifyChange(["slist", "subjectBox"])
@Command
public void searchSubject(@BindingParam("subject") String subject,@BindingParam("subjectBox") Listbox subjectBox){
slist=Subject.createCriteria().list(){
if (subject.value) {
or{
like('code',"%"+subject.value+"%")
like('name',"%"+subject.value+"%")
}
}
}
subjectBox.setModel(slist)
}
@NotifyChange(["subjectList","paymentModeInstance"])
@Command
public void addPaymentMode(@BindingParam("win") Window win,@BindingParam("subjectBox") Listbox subjectBox){
println "cusBox="+subjectBox.getSelectedItem().value
win.setVisible(false)
}