gboat2.base.view.components
类 Autocompleter

java.lang.Object
  继承者 org.apache.struts2.components.Component
      继承者 org.apache.struts2.components.UIBean
          继承者 org.apache.struts2.components.ListUIBean
              继承者 gboat2.base.view.components.Autocompleter

public class Autocompleter
extends org.apache.struts2.components.ListUIBean

创建一个带有自动提示功能的输入框,根据用户输入值进行搜索和过滤,让用户快速找到并从预设值列表中选择。 详见 Autocomplete Widget

 示例代码:
 
 示例1:一次性获取到所有待选数据
 <g2:autocompleter id="auto_1" name="auto_1" list="languages" label="编程语言"/>
 
 示例2:从远程服务器请求 JSON 数据(数组)
 <g2:autocompleter id="auto_2" name="auto_2" label="编程语言" delay="100" minLength="2">
     <g2:remote href="autocompleter!queryArray.do"/>
 </g2:autocompleter>
 

示例3:从远程服务器请求 JSON 数据(Map) <g2:autocompleter id="auto_3" name="auto_3" label="编程语言" placeholder="你最擅长的编程语言" forceValidOption="true"> <g2:remote href="autocompleter!queryMap.do"/> </g2:autocompleter>

从以下版本开始:
3.0
作者:
何明旺

字段摘要
protected  String autoFocus
           
protected  String delay
           
protected  String forceValidOption
           
static String JQUERYACTION
           
protected  String listLabel
           
protected  String maxlength
           
protected  String minLength
           
protected  String multiple
           
protected  String onFocusTopics
           
protected  String onSearchTopics
           
protected  String onSelectTopics
           
protected  String readonly
           
protected  String selectBox
           
protected  String selectBoxIcon
           
protected  String size
           
static String TEMPLATE
           
protected  String valueWidget
           
 
从类 org.apache.struts2.components.ListUIBean 继承的字段
list, listCssClass, listCssStyle, listKey, listTitle, listValue, throwExceptionOnNullValueAttribute
 
从类 org.apache.struts2.components.UIBean 继承的字段
accesskey, cssClass, cssErrorClass, cssErrorStyle, cssStyle, defaultTemplateDir, defaultUITheme, disabled, dynamicAttributes, errorPosition, id, javascriptTooltip, key, label, labelPosition, labelSeparator, name, onblur, onchange, onclick, ondblclick, onfocus, onkeydown, onkeypress, onkeyup, onmousedown, onmousemove, onmouseout, onmouseover, onmouseup, onselect, request, requiredLabel, requiredPosition, response, standardAttributesMap, tabindex, template, templateDir, templateEngineManager, templateSuffix, theme, title, tooltip, tooltipConfig, tooltipCssClass, tooltipDelay, tooltipIconPath, uiThemeExpansionToken, value
 
从类 org.apache.struts2.components.Component 继承的字段
actionMapper, COMPONENT_STACK, parameters, stack, throwExceptionOnELFailure
 
构造方法摘要
Autocompleter(com.opensymphony.xwork2.util.ValueStack stack, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
           
 
方法摘要
 void evaluateParams()
           
protected  String getDefaultTemplate()
           
 void setAutoFocus(String autoFocus)
           
 void setDelay(String delay)
           
 void setForceValidOption(String forceValidOption)
           
 void setList(Object list)
           
 void setListLabel(String listLabel)
           
 void setMaxlength(String maxlength)
           
 void setMinLength(String minLength)
           
 void setMultiple(String multiple)
           
 void setOnFocusTopics(String onFocusTopics)
           
 void setOnSearchTopics(String onSearchTopics)
           
 void setOnSelectTopics(String onSelectTopics)
           
 void setReadonly(String readonly)
           
 void setSelectBox(String selectBox)
           
 void setSelectBoxIcon(String selectBoxIcon)
           
 void setSize(String size)
           
 void setValueWidget(String valueWidget)
           
 
从类 org.apache.struts2.components.ListUIBean 继承的方法
contains, evaluateExtraParams, getValueClassType, setListCssClass, setListCssStyle, setListKey, setListTitle, setListValue, setThrowExceptionOnNullValueAttribute
 
从类 org.apache.struts2.components.UIBean 继承的方法
addFormParameter, buildTemplateName, copyParams, enableAncestorFormCustomOnsubmit, end, ensureAttributeSafelyNotEscaped, escape, evaluateNameValue, getId, getStandardAttributes, getTemplate, getTemplateDir, getTheme, getTooltipConfig, mergeTemplate, populateComponentHtmlId, setAccesskey, setCssClass, setCssErrorClass, setCssErrorStyle, setCssStyle, setDefaultTemplateDir, setDefaultUITheme, setDisabled, setDynamicAttributes, setErrorPosition, setId, setJavascriptTooltip, setKey, setLabel, setLabelposition, setLabelSeparator, setName, setOnblur, setOnchange, setOnclick, setOndblclick, setOnfocus, setOnkeydown, setOnkeypress, setOnkeyup, setOnmousedown, setOnmousemove, setOnmouseout, setOnmouseover, setOnmouseup, setOnselect, setRequiredLabel, setRequiredPosition, setTabindex, setTemplate, setTemplateDir, setTemplateEngineManager, setTheme, setTitle, setTooltip, setTooltipConfig, setTooltipCssClass, setTooltipDelay, setTooltipIconPath, setUIThemeExpansionToken, setValue
 
从类 org.apache.struts2.components.Component 继承的方法
addAllParameters, addParameter, altSyntax, completeExpressionIfAltSyntax, determineActionURL, determineNamespace, end, fieldError, findAncestor, findString, findString, findStringIfAltSyntax, findValue, findValue, findValue, getComponentStack, getParameters, getStack, popComponentStack, setActionMapper, setThrowExceptionsOnELFailure, setUrlHelper, start, stripExpressionIfAltSyntax, toString, usesBody
 
从类 java.lang.Object 继承的方法
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

字段详细信息

JQUERYACTION

public static final String JQUERYACTION
另请参见:
常量字段值

TEMPLATE

public static final String TEMPLATE
另请参见:
常量字段值

autoFocus

protected String autoFocus

delay

protected String delay

minLength

protected String minLength

maxlength

protected String maxlength

readonly

protected String readonly

size

protected String size

selectBox

protected String selectBox

selectBoxIcon

protected String selectBoxIcon

multiple

protected String multiple

listLabel

protected String listLabel

forceValidOption

protected String forceValidOption

valueWidget

protected String valueWidget

onSelectTopics

protected String onSelectTopics

onFocusTopics

protected String onFocusTopics

onSearchTopics

protected String onSearchTopics
构造方法详细信息

Autocompleter

public Autocompleter(com.opensymphony.xwork2.util.ValueStack stack,
                     javax.servlet.http.HttpServletRequest request,
                     javax.servlet.http.HttpServletResponse response)
方法详细信息

getDefaultTemplate

protected String getDefaultTemplate()
指定者:
org.apache.struts2.components.UIBean 中的 getDefaultTemplate

evaluateParams

public void evaluateParams()
覆盖:
org.apache.struts2.components.UIBean 中的 evaluateParams

setAutoFocus

public void setAutoFocus(String autoFocus)

setDelay

public void setDelay(String delay)

setMinLength

public void setMinLength(String minLength)

setMaxlength

public void setMaxlength(String maxlength)

setReadonly

public void setReadonly(String readonly)

setSize

public void setSize(String size)

setSelectBox

public void setSelectBox(String selectBox)

setSelectBoxIcon

public void setSelectBoxIcon(String selectBoxIcon)

setMultiple

public void setMultiple(String multiple)

setListLabel

public void setListLabel(String listLabel)

setForceValidOption

public void setForceValidOption(String forceValidOption)

setValueWidget

public void setValueWidget(String valueWidget)

setOnSelectTopics

public void setOnSelectTopics(String onSelectTopics)

setOnFocusTopics

public void setOnFocusTopics(String onFocusTopics)

setOnSearchTopics

public void setOnSearchTopics(String onSearchTopics)

setList

public void setList(Object list)
覆盖:
org.apache.struts2.components.ListUIBean 中的 setList


Copyright © 2014 广联达软件股份有限公司(Glodon Software Co., Ltd.). All rights reserved.