Uploaded image for project: 'Keikai'
  1. Keikai
  2. KEIKAI-665

Only caption is allowed: zul.tab.Tab

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Blocker Blocker
    • 6.0.0
    • None
    • None
    • Security Level: Jimmy
    • None

      Steps to Reproduce

      1. Run with ZK 10 version

      Current Result

      JS Error: Only caption is allowed: zul.tab.Tab

      Expected Result

      No error

      Debug Information

      ZK 10 added constraint for each widget at client.

      For example,

      Tab.prototype.beforeChildAdded_ = function (child, insertBefore) {
          var firstChild = this.firstChild;
          if (child instanceof zul.wgt.Caption) {
            //caption is always the first child (if exist)
            if (firstChild && firstChild instanceof zul.wgt.Caption && firstChild != child) {
              zk.error('Only one caption is allowed: ' + this.className);
              return false;
            }
          } else if (!(child instanceof zul.wgt.Label)) {
            zk.error('Only caption is allowed: ' + this.className);
            return false;
          }
          return true;
        }; 

      Workaround

      Overwrite Tab.prototype.beforeChildAdded_ at zss.SheetTab 

            jumperchen jumperchen
            jumperchen jumperchen
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: