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

MVVM Bind calls getter multiple times

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Trivial Trivial
    • None
    • 7.0.2, 7.0.3
    • Databind 2
    • Windows 7, Eclipse Kepler, Chrome, Mozilla

      I have noticed that a getter in my view model is called multiple times causing me real trouble as this getter executes database transactions. The reason for this is that the control (in my case a selectbox) has been declared inside a Grid to make a nice form layout:

      <row>Type
      <selectbox model="@load(vm.questionnaires)">
      <template name="model" var="q" >
      <label value="@load(q.name)" />
      </template>
      </selectbox>
      </row>

      In this case the getQuestionnaires() is called four times.
      If i declare the <selectbox> outside the grid then it is called only once.

        1. a.zul
          0.2 kB
          vincentjian
        2. b.zul
          0.6 kB
          vincentjian
        3. SelectboxVM.java
          0.5 kB
          vincentjian

            Unassigned Unassigned
            cyiannoulis cyiannoulis
            Votes:
            2 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: