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

Searchbox selection is unsynchronized if ListSubModel is used

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: Normal
    • Resolution: Unresolved
    • Affects Version/s: 9.0.0
    • Fix Version/s: None
    • Component/s: Components
    • Labels:
      None

      Description

      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

        Attachments

          Activity

            People

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

              Dates

              Created:
              Updated: