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

choose-when-otherwise tag for shadow components works wrong

XMLWordPrintable

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

      following shadow component syntax causes <other> to be applied 3 times!
      {{<choose>
      <when test="@load('x' eq '1')"></when>
      <when test="@load('x' eq '2')"></when>
      <when test="@load('x' eq '3')"></when>
      <otherwise>
      <div
      viewModel="@id('vm') @init(view['xy.record.RecordListVM'])">
      </div>
      </otherwise>
      </choose>}}

      logging is as following:
      {{[SystemMonitor] View model xy.record.RecordListVM[1] initialized for desktop z_keg
      [SystemMonitor] View model xy.record.RecordListVM destroyed for desktop z_keg [0]
      [SystemMonitor] View model xy.record.RecordListVM[1] initialized for desktop z_keg
      [SystemMonitor] View model xy.record.RecordListVM destroyed for desktop z_keg [0]
      [SystemMonitor] View model xy.record.RecordListVM[1] initialized for desktop z_keg
      [SystemMonitor] View model xy.record.RecordListVM destroyed for desktop z_keg [0]
      [SystemMonitor] View model xy.record.RecordListVM[1] initialized for desktop z_keg}}

      Our understanding is, that <otherwise> is like default of switch-case statement of java. In fact, <otherwise> seems to be applied for each negative <when> test!!!!

            Unassigned Unassigned
            fse fse
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: