0

Toolbarbutton is no longer rendered as <a></a>

asked 2014-10-21 12:33:36 +0800

abcd123 gravatar image abcd123
17 3

updated 2014-10-21 12:46:56 +0800

Hello :),

After upgrade from 3.6.5 to 6.0.2 I noticed that toolbarbutton is no longer rendered as anchor ( <a></a> ) but rather as a <div>. This breaks my styling. Is there a configuration property which will let my toolbarbuttons remain anchors?

Thank you.

delete flag offensive retag edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2014-10-28 01:03:30 +0800

JerryChen gravatar image JerryChen
1596 3
ZK Team

you can use zk.override to replace the new layout.

<zk>

<script><![CDATA[
zk.afterLoad('zul.wgt',function(){
var superFunction = {};
zk.override(zul.wgt.Button.prototype,superFunction,{
redraw : function(out){
    var tabi = this._tabindex;

    out.push('<input type="', this._type, '"', this.domAttrs_());
    if (this._disabled) out.push(' disabled="disabled"');
    if (tabi) out.push(' tabindex="', tabi, '"');
    out.push('>');
}
});
});
]]></script>

<button label="test"></button>

</zk>

this is not a exact way to your application. Instead, it's just a workaround. This example will replace the original layout "button" with "input". you can follow this way to fix your issue. But I strongly recommend that you can send mail to ZK support to get full and professional suggestion about upgrading ZK version.

link publish delete flag offensive edit
Your answer
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow
1 follower

RSS

Stats

Asked: 2014-10-21 12:33:36 +0800

Seen: 13 times

Last updated: Oct 28 '14

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