Application Platform 10.7 | Application Platform API | webMethods Tag Library for JSP | <webm:value>
 
<webm:value>
Use the <webm:value> tag to insert the values of one or more variables from the Integration Server pipeline into the HTML page produced from the JSP. You can also use the tag within a loop to insert the value of the current key from the loop by specifying the tag without any arguments.
Syntax
Separate nested fields with a forward slash (/).
<webm:value [variable="variable[/subvariable1/subvariable2/...
/subvariablen]"] [null="any_string"] [empty="any_string"] [index="n"]
[encode="code"] [decode="code"] [decimalShift="X"] [decimalShow="Y"]/>
Arguments
Argument
Description
[variable="variable
[/
subvariable1/
subvariable2/.../
subvariable3]"]
Pipeline variable which value to insert. Integration Server retrieves variable from the current scope. If you do not specify variable and you are inside a loop, Integration Server returns the value of the current key.
You can select a variable out of the current scope by using the required syntax, as follows:
*/variable - inserts the value of variable from the initial scope
*../variable - inserts the value of variable from the parent of the current scope
*variable/subvariable1/subvariable2/.../subvariable3 - inserts the value of subvariablen from variable
If you do not specify variablen, Integration Server assumes that the current element is within the current scope.
[null="any_string"]
When variablen is null, inserts any_string.
Example
<webm:value variable="carrier"
null="No Carrier Assigned"/>
[empty="any_string"]
When variablen contains an empty string, inserts any_string.
Example
<webm:value variable="description"
empty="Description Not Found"/>
[index="n"]
Inserts element n of the Document List or String List specified by variable.
Example
<webm:value variable="backItems" index="1"/>
[encode="code"]
Encodes the contents of variable before it is inserted.
code specifies the encoding system to use, as follows:
*xml - XML encoding
*b64 - Base-64 encoding
*url - URL encoding
[decode="code"]
Decodes the contents of variable before it is inserted.
code specifies the decoding system to use, as follows:
*b64 - Base-64 decoding
*url - URL decoding
[decimalShift="X"]
For decimal values only. Shifts the decimal point in the value of variable X positions to the right before inserting the value.
[decimalShow="Y"]
For decimal values only. Truncates the value of variable Y positions after the decimal before inserting the value.
Usage Notes
Use a forward slash (/) to separate nested fields.
Examples
*To call the orders:getOrderInfo service and insert the results of the service into the HTML page produced from the JSP:
<webm:invoke serviceName="orders:getOrderInfo"><br>
<p><webm:value variable="buyerInfo/companyName"/><br>
<webm:value variable="buyerInfo/acctNum"/>
<p>This shipment contains the following items</p>
<table width="90%" border="1">
<tr>
<td>Number</td><td>Qty</td>
<td>Description</td><td>Status</td>
</tr>
<tr>
<webm:loop variable="items">
<td><webm:value variable="stockNum"/></td>
<td><webm:value variable="qty"/></td>
<td><webm:value variable="description"/></td>
<td><webm:value variable="status"/></td>
</tr>
</webm:loop>
</table>
</webm:invoke>
*To code loops over the pipeline and insert the names and values of the keys in the pipeline into the HTML page:
<webm:loop loopStruct="true">
<webm:value variable="$key"/><br>
<webm:value/><br>
</webm:loop>
*To insert the contents of the variable carrier into the HTML page or insert the string "UPS" if the carrier value is null or empty:
<webm:value variable="carrier" null="UPS" empty="UPS"/>