zk - Why bindings do not work? -
<textbox id="nexttitletextbox" readonly="true" value="@bind(ivm.inventory.successortitlename)" /> <button id="nexttitlebutton" label="..." mold="trendy" onclick="@command('chooseformerorsuccessor', isformer = false)"/> <a id="nexttitlehrefview" href="/inventory_new.do?method=edit&docuid=${ivm.inventory.successortitlename}">view</a> <a id="nexttitlehrefhistory" href="javascript:showrenaminghistory(${ivm.inventory.successortitlename},${ivm.inventory.successortitlename})">history</a>
the problem in 'a' tags. textbox , buttons works fine, links in 'a' tags not catch information binding, link there looks /inventory_new.do?method=edit&docuid=
. don't understand what's wrong here, because tried lot of combination , similar working on other pages. mistake in binding?
i tried put string zscript
<zscript> string successortitlehref = "/inventory_new.do?method=edit&docuid=" + ivm.inventory.successortitlename; </zscript>
but got exception:
typed variable declaration : class or variable not found: ivm.inventory.replacementtitlename.
also, it's supported controls, locates in separate file, , every control adding use derective.
binding in zk has nothing variable replacement. @bind()
doesn't mean can use ${...}
. 2 separate concepts though both called "el expression" in manual. binding el expression , zuml el expressions 2 different things.
to allow access ivm
in zscript
, need define variable somewhere in script. 1 way instantiate it:
ivm ivm = new ivm();
or can use custom variable resolver.
Comments
Post a Comment