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

NotifyChange("*") does not work on combobox if the new selected item is null

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Icon: Normal Normal
    • None
    • 8.0.2
    • Components, Databind 2
    • None

      When having a NotifyChange("*") annotation around a method and a combobox in which the selectedItem is bound to a property, and that property changes to a null value, the combobox will continue showing the previous selected value instead of the null value.
      If you use NotifyChange(

      {"property1", "property2"}

      ) and list all the properties that change, the combobox behaves properly.
      e.g.:

      <combobox
      id="bestellerCombobox"
      autocomplete="true" constraint="strict, no empty"
      model="@load(vm.personList)"
      selectedItem="@bind(vm.selectedOrder.gastroblPerson)"
      autodrop="true"
      width="95%">
      <template name="model" var="item">
      <comboitem
      label="@load(item) @converter('org.rorotec.lasso.converters.ConverterPerson')"
      description="@load(item) @converter('org.rorotec.lasso.converters.ConverterPersonDetail')"/>
      </template>
      </combobox>

      @NotifyChange("*")
      @Command
      public void filterItems()

      Unknown macro: { orderList = // do some stuff selectedOrder = orderList.get(0); }

      the above example doesn't work properly, while with
      @NotifyChange(

      {"selectedOrder", "orderList"}

      ) it works perfectly.

            DevChu DevChu
            yennor yennor
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: