Difference between revisions of "Example of execution getParameter"
From Documentation
(Created page with '{{ZKDevelopersGuidePageHeader}} helloworld.zul is as follow: <source lang="xml" > <window> 1:${param.contributor} <button id="contributor"/> <zscript > contributor.labe…') |
m (correct highlight (via JWB)) |
||
Line 17: | Line 17: | ||
http://localhost:8080/zksTest/helloworld.zul?contributor=abc | http://localhost:8080/zksTest/helloworld.zul?contributor=abc | ||
− | < | + | <code>?contributor=abc</code> following original url will be put into <code>param</code>, it means a variable named contributor, and its value is "abc". And developer can get it through <code>Executions.getCurrent().getParameter</code>. |
{{ ZKDevelopersGuidePageFooter}} | {{ ZKDevelopersGuidePageFooter}} |
Latest revision as of 02:57, 20 January 2022
This documentation is for an older version of ZK. For the latest one, please click here.
helloworld.zul is as follow:
<window>
1:${param.contributor}
<button id="contributor"/>
<zscript >
contributor.label = Executions.getCurrent().getParameter("contributor");
</zscript>
</window>
Assume helloworld.zul is under project zksTest, and you visit the url: http://localhost:8080/zksTest/helloworld.zul?contributor=abc
?contributor=abc
following original url will be put into param
, it means a variable named contributor, and its value is "abc". And developer can get it through Executions.getCurrent().getParameter
.