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

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Normal Normal
    • 6.5.1
    • 5.0.7, 6.0.1
    • CSS, ZK Update Engine
    • None

      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')"

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

              Created:
              Updated:
              Resolved: