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

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

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: 6.5.3
    • Fix Version/s: 6.5.4
    • Component/s: Components
    • Security Level: Jimmy
    • Labels:

      Description

      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)

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved: