Name | Type and Description |
---|---|
values | java.util.Map |
A map containing values associated with subscript fields. The key should be a subscript field and the corresponding value is either a String or a String[] object. An IllegalArgumentException will be thrown if any other object is used with the methods in the map. | |
messages | java.util.Map |
A map containing messages associated with subscripts fields. The key is a subscript field and the corresponding value is a String object. An IllegalArgumentException will be thrown if any other is used with the methods in the map. |
##
## Get the subscript reference
#set ($subscriptRef = $portlet.getNode("Form/MyScriptField/MySubscript") )
##
## Get properties from subscript
#set ($id = $propertyUtil.getString($subscriptRef, "id"))
#set ($type = $propertyUtil.getString($subscriptRef, "type"))
#set ($question = $propertyUtil.getString($subscriptRef,"question",""))
##
## Render label
<label class="$labelFont" for="$id">$question</label>
<br />
##
## Render input tag avoiding XSS problems
#if ($values.containsKey($subscriptRef))
#set ($value = $values.get($subscriptRef))
#else
#set ($value = "")
#end
<input class="$inputFont" id="$id" name="$id" type="$type" value="$endecUtil.escapeXML($value)"/>
<br />
##
## Render error message (if any)
#if ($messages.containsKey($subscriptRef))
<span class="$errorFont">$messages.get($subscriptRef)</span>
<br />
#end
Last updated: