Application Integration (On-Premises) : Incorporating web applications : webMethods Tag Library for JSP : <webm:value>
<webm:value>
You 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 loop’s current key. To do so, specify the tag without any arguments (that is, <webm:value/>).
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 whose 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.
To select a variable outside the current scope, use this syntax:
To do this...
Use this syntax...
Insert the value of variable from the initial scope
/variable
Insert the value of variable from the parent of the current scope
../variable
Insert the value of subvariablen from variable

variable/subvariable1/ subvariable2/.../ subvariable3
If you do not specify variablen, Integration Server assumes the current element 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 the nth element 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 inserting it, where code specifies the encoding system to apply, as follows:
To encode the value using...
Set code to...
XML encoding
xml
Base-64 encoding
b64
URL encoding
url
[decode="code"]
Decodes the contents of variable before inserting it, where code specifies the decoding system to apply, as follows:
To encode the value using...
Set code to...
Base-64 encoding
b64
URL encoding
url
[decimalShift="X"]
Shifts the decimal point in the value of variable to the right X positions before inserting the value. For decimal values only.
[decimalShow="Y"]
Truncates the value of variable to Y positions after the decimal before inserting the value. For decimal values only.
Examples
*This code calls the orders:getOrderInfo service and inserts 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>
*This code loops over the pipeline and inserts 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>
*This code inserts the contents of the variable carrier into the HTML page. If carrier is null or empty, the code inserts the string “UPS”.
<webm:value variable="carrier" null="UPS" empty="UPS"/>
Copyright © 2015- 2016 Software AG, Darmstadt, Germany.

Product LogoContact Support   |   Community   |   Feedback