param"
From Documentation
Robertwenzel (talk | contribs) |
|||
Line 2: | Line 2: | ||
= param - java.util.Map = | = param - java.util.Map = | ||
− | + | It's a map (<tt>Map<String, String></tt>) of HTTP request parameter like the one returned by [http://docs.oracle.com/javaee/6/api/javax/servlet/ServletRequest.html#getParameterMap() ServletRequest.getParameterMap()] | |
+ | |||
+ | If you visit a page with the URL like | ||
+ | http://localhost:8080/mypage.zul?p1=v1&p2=v2 | ||
+ | |||
+ | Then you can retrieve parameters' value with the syntax below: | ||
+ | <source lang="xml"> | ||
+ | ${param.p1} | ||
+ | ${param.p2} | ||
+ | </source> | ||
+ | And the reulst will be: | ||
+ | <source lang="xml"> | ||
+ | v1 | ||
+ | v2 | ||
+ | </source> | ||
To retrieve all possible parameter values, use <tt>paramValues</tt> instead. | To retrieve all possible parameter values, use <tt>paramValues</tt> instead. |
Revision as of 03:37, 14 June 2017
param - java.util.Map
It's a map (Map<String, String>) of HTTP request parameter like the one returned by ServletRequest.getParameterMap()
If you visit a page with the URL like
http://localhost:8080/mypage.zul?p1=v1&p2=v2
Then you can retrieve parameters' value with the syntax below:
${param.p1}
${param.p2}
And the reulst will be:
v1
v2
To retrieve all possible parameter values, use paramValues instead.
${param.something}
${paramValues.something[0]}
Notice that, in zscript, there is no paramValues. Param is a map of possible values, Map<String, String[]>.
<zscript>
String[] values = param.get("something");
</zscript>
Version History
Version | Date | Content |
---|---|---|