text.vm

来自「2005年出版之《Beginning Java Server Pages》亚马逊」· VM 代码 · 共 37 行

VM
37
字号
#*
  -- text.vm
  --
  -- Required Parameters:
  --   * label      - The description that will be used to identfy the control.
  --   * name       - The name of the attribute to put and pull the result from.
  --                  Equates to the NAME parameter of the HTML INPUT tag.
  --
  -- Optional Parameters:
  --   * labelposition   - determines were the label will be place in relation
  --                       to the control.  Default is to the left of the control.
  --   * size       - SIZE parameter of the HTML INPUT tag.
  --   * maxlength  - MAXLENGTH parameter of the HTML INPUT tag.
  --   * disabled   - DISABLED parameter of the HTML INPUT tag.
  --   * readonly   - READONLY parameter of the HTML INPUT tag.
  --   * onkeyup    - onkeyup parameter of the HTML INPUT tag.
  --   * tabindex  - tabindex parameter of the HTML INPUT tag.
  --   * onchange  - onkeyup parameter of the HTML INPUT tag.
  --
    *#
#parse("/template/xhtml/controlheader.vm")

<input type="text"
                                   name="$parameters.name"
#if ($parameters.size)             size="$parameters.size"            #end
#if ($parameters.maxlength)        maxlength="$parameters.maxlength"  #end
#if ($parameters.nameValue)        value="$parameters.nameValue"      #end
#if ($parameters.disabled == true) disabled="disabled"                #end
#if ($parameters.readonly)         readonly="readonly"                #end
#if ($parameters.onkeyup)          onkeyup="$parameters.onkeyup"      #end
#if ($parameters.tabindex)         tabindex="$parameters.tabindex"    #end
#if ($parameters.onchange)         onchange="$parameters.onchange"    #end
#if ($parameters.id)               id="$parameters.id"                #end
/>

#parse("/template/xhtml/controlfooter.vm")

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?