Uploaded image for project: 'ZK'
  1. ZK
  2. ZK-2177

combobox bound selectedItem not updated on up or down key

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Normal Normal
    • None
    • 6.5.5
    • Components
    • Windows 7, JDK 7, Tomcat 7

      When using UP or DOWN key to select combobox items, bound selectedItem is not updated.
      In the following example if the country is chosen with UP or DOWN key, the label is not updated accordingly.

      <zk>
      	<hlayout apply="org.zkoss.bind.BindComposer" viewModel="@id('vm') @init('TestVM')">
      		<combobox model="@init(vm.countries)" selectedItem="@bind(vm.country)">
      			<template name="model">
      				<comboitem value="${each}" label="${each}" />
      			</template>
      		</combobox>
      		<label value="@load(vm.country)" />
      	</hlayout>
      </zk>
      
      public class TestVM {
      	private String country;
      
      	public String[] getCountries() {
      		return new String[] { "ES", "FR", "IT", "UK" };
      	}
      
      	public String getCountry() {
      		return country;
      	}
      
      	public void setCountry(String country) {
      		this.country = country;
      	}
      }
      

            Unassigned Unassigned
            benedetti benedetti
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: