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

combobox bound selectedItem not updated on up or down key

    XMLWordPrintable

Details

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

    Description

      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;
      	}
      }
      

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated: