param"

From Documentation
m
m (correct highlight (via JWB))
 
(4 intermediate revisions by 4 users not shown)
Line 1: Line 1:
 
{{ZUMLReferencePageHeader}}
 
{{ZUMLReferencePageHeader}}
  
== param - java.util.Map ==
+
= param - java.util.Map =
A map of parameters of the request, <tt>Map&lt;String, String&gt;</tt>.
+
It's a map (<code>Map&lt;String, String&gt;</code>) of HTTP request parameter like the one returned by [http://docs.oracle.com/javaee/6/api/javax/servlet/ServletRequest.html#getParameterMap() ServletRequest.getParameterMap()]
  
To retrieve all possible parameter values, use <tt>paramValues</tt> instead.
+
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 <code>paramValues</code> instead.
  
 
<source lang="xml">
 
<source lang="xml">
Line 11: Line 25:
 
</source>
 
</source>
  
Notice that, in zscript, there is no <tt>paramValues</tt>. In additions, <tt>param</tt> is a map of possible values,  <tt>Map&lt;String, String[]&gt;</tt>.
+
Notice that, in zscript, there is no <code>paramValues</code>. <code>Param</code> is a map of possible values,  <code>Map&lt;String, String[]&gt;</code>.
  
 
<source lang="xml">
 
<source lang="xml">
Line 18: Line 32:
 
</zscript>
 
</zscript>
 
</source>
 
</source>
 +
 +
=Version History=
 +
{{LastUpdated}}
 +
{| border='1px' | width="100%"
 +
! Version !! Date !! Content
 +
|-
 +
| &nbsp;
 +
| &nbsp;
 +
| &nbsp;
 +
|}
  
 
{{ZUMLReferencePageFooter}}
 
{{ZUMLReferencePageFooter}}

Latest revision as of 13:26, 19 January 2022

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

Last Update : 2022/01/19


Version Date Content
     



Last Update : 2022/01/19

Copyright © Potix Corporation. This article is licensed under GNU Free Documentation License.