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

Chosenbox emptyMessage does not re-appear after remove all selected items

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Normal Normal
    • 6.5.4
    • 6.5.3
    • Components
    • Security Level: Jimmy

      the issue occurs only when you use the cross x button to remove all selected items from Chosenbox and then click outside of Chosenbox (if you tab out using keyboard the emtyMessage reappears).
      Test case

      <zk>
      <window id="win" apply="org.zkoss.support.WindowComposer">
          <chosenbox id="cbox" width="500px" emptyMessage="choose a person"></chosenbox>
      </window>
      </zk>
      {code:title=WindowComposer.java|borderStyle=solid}
      public class WindowComposer extends SelectorComposer<Window> {
      
      	@Wire
      	Chosenbox cbox;
      	
      	public void doAfterCompose(Window win) throws Exception {
      		super.doAfterCompose(win);
      		ArrayList<String> alist = new ArrayList<String>();
      		alist.add("Tony");
      		alist.add("Thor");
      		alist.add("Peter");
      		cbox.setModel(new ListModelList<String>(alist));
      	}
      

      Steps to reproduce
      1. Select some items
      2. Remove items by clicking the x button on selected item lables
      3. after the selection is empty click outside of chosenbox

      Expected Result:
      Chosenbox shows the emptyMessage
      Actual Result:
      Chosenbox doesn't show emptyMessage (it can show if you tab out after selection is empty)

            jumperchen jumperchen
            ashishd ashishd
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: