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

Searchbox selection is unsynchronized if ListSubModel is used

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Normal Normal
    • None
    • 9.0.0
    • Components
    • None

      Steps to Reproduce

      <zk>
        <zscript><![CDATA[
          ListModel model = new ListModelList(Locale.getAvailableLocales());
          model.setMultiple(true);
          model.addToSelection(Locale.ENGLISH);
      
          ListModel subModel = ListModels.toListSubModel(model);
          ]]>
        </zscript>
        <searchbox model="${subModel}" />
      </zk>
      
      1. Open the searchbox, search for en

      Current Result

      en is not selected

      Expected Result

      en is selected

      Debug Information

      selectedUuids:[null]

      If ListModel is a SubModel, full items won't be passed to client. Thus no item will be generated with a proper UUID.
      Since _itemUuidRelations is empty. The result will be always null.

      Workaround

      1. Use a ListModel (not a ListSubModel)
      2. Don't select any item at first

            DevChu DevChu
            rudyhuang rudyhuang
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: