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

choose-when-otherwise tag for shadow components works wrong

    Details

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

      Description

      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!!!!

        Activity

        Hide
        fse fse added a comment -

        See also ZK-4026

        Show
        fse fse added a comment - See also ZK-4026

          People

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

            Dates

            • Created:
              Updated: