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

listbox/template does not support execution.arg

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Fix
    • Icon: Normal Normal
    • None
    • 6.0.0
    • Components

      A ZUL file loaded with Executions.createComponents(..., arg) contains a listbox with an optional column B, i.e. it should only be shown depending on arg.type:

      <listbox model="...">
      <listhead sizable="true">
      <listheader label="A"/>
      <listheader label="B" if="${arg.type == 'B'}"/>
      <listheader label="C"/>
      </listhead>
      <template name="model" var="entry">
      <listitem>
      <listcell label="@load(entry.a)"/>
      <listcell label="@load(entry.b)" if="${arg.type == 'B'}"/>
      <listcell label="@load(entry.c)"/>
      </listitem>
      </template>
      </listbox>

      Problem: ${arg.type == 'B'} evaluates to true in <listheader>, but evaluates to false in <listcell> (because arg is null there).
      This means column B is shown but the values of column C are displayed in column B.

      It seems that BindComposer suffers from problem 2937096 (http://sourceforge.net/tracker/?func=detail&aid=2937096&group_id=152762&atid=785191), which was solved for GenericForwardComposer.
      Debugging showed that Execution.arg is null in the template context (context is onInitRender event).

      I can prepare a working test case if needed.

            Unassigned Unassigned
            Matze2 Matze2
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: