Source

webwork / src / java / template / simple / combobox.vm

Full commit
<input type="text"
       name="$!webwork.htmlEncode($parameters.name)"
#if ($parameters.size)             size="$!webwork.htmlEncode($parameters.size)"            #end
#if ($parameters.maxlength)        maxlength="$!webwork.htmlEncode($parameters.maxlength)"  #end
#if ($parameters.nameValue)        value="$!webwork.htmlEncode($parameters.nameValue)"      #end
#if ($parameters.disabled == true) disabled="disabled"                                      #end
#if ($parameters.tabindex)         tabindex="$!webwork.htmlEncode($parameters.tabindex)"    #end
#if ($parameters.id)               id="$!webwork.htmlEncode($parameters.id)"                #end
#if ($parameters.cssClass)         class="$!webwork.htmlEncode($parameters.cssClass)"       #end
#if ($parameters.cssStyle)         style="$!webwork.htmlEncode($parameters.cssStyle)"       #end
#parse("/template/simple/scripting-events.vm")
/><br/>

#if ($parameters.list)
      <select onChange="this.form.elements['$!webwork.htmlEncode($parameters.name)'].value=this.options[this.selectedIndex].value"
         #if ($parameters.disabled == true) disabled="disabled" #end
      >
            #foreach ($param in $parameters.list)
                <option value="$!webwork.htmlEncode($param)" #if ($parameters.name == $param) selected="selected" #end >$!webwork.htmlEncode($param)</option>
            #end
      </select>#end