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

Setting an sClass on a selected tab results in tab losing z-tab-seld class

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: 5.0.7, 6.0.1
    • Fix Version/s: 6.5.1
    • Component/s: CSS, ZK Update Engine
    • Labels:
      None

      Description

      I'm experiencing the same problem as described here: http://www.zkoss.org/forum/listComment/19009
      My example is:

      <tab apply="org.zkoss.bind.BindComposer"
      viewModel="@id('vm') @init('my.TabModel')"
      label="@load(vm.title)"
      sclass="@load(vm.status.dirty ? 'tab-dirty' : 'tab-clean')"/>

      The 'tab-dirty' and 'tab-clean' classes are applied properly when vm.status.dirty flag is toggled, but the ZK's standard class z-tab-seld is lost whenever the sClass is changed via @load.

      My workaround is to have
      sclass="@load(vm.status.dirty ? self.selected ? 'z-tab-seld tab-dirty' : 'tab-dirty' : self.selected ? 'z-tab-seld tab-clean' : 'tab-clean')"

        Attachments

          Activity

            People

            Assignee:
            jumperchen jumperchen
            Reporter:
            hattifnat hattifnat
            Votes:
            2 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: