as code below, the combobox should become enabled when clicking 'CONTACT',
it works well with 6.5.3 but has problem including and after 6.5.4
Furthermore, it doesn't work properly as soon as you change 'onClick' event to 'onCheck' event,
including and after 6.5.3,
the setter will be triggered only once, and the order is not correct.
<?init class="org.zkoss.zkplus.databind.AnnotateDataBinderInit" ?> <zk> <window> <zscript><![CDATA[ class SelectionModel{ String ticketAuthorType = "CURRENT"; selectedAuthorContact = null; public String getTicketAuthorType() { return ticketAuthorType; } public void setTicketAuthorType(String string) { System.out.println("setTicketAuthorType " + string); ticketAuthorType = string; } public String getSelectedAuthorContact() { return selectedAuthorContact; } public void setSelectedAuthorContact(String string) { selectedAuthorContact = string; } public getContacts() { if("CURRENT".equals(ticketAuthorType)) { return new String[]{}; } else { return new String[] {"Jean Dupont", "Jeanne Dupond"}; } } } class MyClass { SelectionModel selectionModel = new SelectionModel(); public SelectionModel getSelectionModel() { return selectionModel; } public isTicketAuthorContactDisabled() { System.out.println("isTicketAuthorContactDisabled"); System.out.println(selectionModel.ticketAuthorType); return !"CONTACT".equals(selectionModel.ticketAuthorType); } public boolean getTicketAuthorContactDisabled() { System.out.println("getTicketAuthorContactDisabled"); System.out.println(selectionModel.ticketAuthorType); return !"CONTACT".equals(selectionModel.ticketAuthorType); } } controller = new MyClass(); ]]> </zscript> <radiogroup id="ticketAuthorTypeField" onClick='System.out.println("checked");' selectedItem="@{controller.selectionModel.ticketAuthorType, save-when='self.onClick'}"> <radio label="CURRENT:" value="CURRENT"/> <radio label="CONTACT:" value="CONTACT"/> <combobox id="authorContactField" sclass="koalyexpOptionL" autodrop="true" buttonVisible="false" model="@{controller.selectionModel.contacts, load-after='ticketAuthorTypeField.onClick'}" selectedItem="@{controller.selectionModel.selectedAuthorContact, save-when='self.onSelect', load-after='ticketAuthorTypeField.onClick'}" disabled="@{controller.ticketAuthorContactDisabled, load-after='ticketAuthorTypeField.onClick'}"> <comboitem self="@{each=contact}" label="@{contact}"/> </combobox> </radiogroup> </window> </zk>
- relates to
-
ZK-3866 popup doClick prevents DOM state update after ZK 3606
- Closed