Revision history [back]

click to hide/show revision 1
initial version

answered 2013-05-20 12:49:20 +0800

benbai gravatar image benbai

http://www.zkoss.org

Yes, I just describe the reason.

For your requirement, I probably will try to solve it with widget override instead of css selector,

e.g., override the bind_ function of widget as below:

bind_: function (a, b, c) {
    this.$bind_(a, b, c); // or _wgt.bind_.apply(this, arguments); whatever...
    // probably detect widget class as needed
    var head;
    if (head = this.$n('head')) {
        jq(head).css(...); // apply style as needed
    }
}

Since I think the naming rule is more reliable than selector.

Yes, I just describe the reason.

For your requirement, I probably will try to solve it with widget override instead of css selector,

e.g., override the bind_ function of widget as below:

bind_: function (a, b, c) {
    this.$bind_(a, b, c); // or _wgt.bind_.apply(this, arguments); whatever...
    // probably detect widget class as needed
    var head;
    if (head = this.$n('head')) {
        jq(head).css(...); // apply style as needed
    }
}

Since I think the naming rule of element in widget is more reliable than selector.

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More