📄 autocompleter.java
字号:
// Decompiled by Jad v1.5.8e2. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://kpdus.tripod.com/jad.html
// Decompiler options: packimports(3) fieldsfirst ansi space
// Source File Name: Autocompleter.java
package org.apache.struts2.components;
import com.opensymphony.xwork2.util.ValueStack;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
// Referenced classes of package org.apache.struts2.components:
// ComboBox
public class Autocompleter extends ComboBox
{
public static final String TEMPLATE = "autocompleter";
private static final String COMPONENT_NAME = org/apache/struts2/components/Autocompleter.getName();
protected String forceValidOption;
protected String searchType;
protected String autoComplete;
protected String delay;
protected String disabled;
protected String href;
protected String dropdownWidth;
protected String dropdownHeight;
protected String formId;
protected String formFilter;
protected String listenTopics;
protected String notifyTopics;
protected String indicator;
protected String loadOnTextChange;
protected String loadMinimumCount;
protected String showDownArrow;
protected String templateCssPath;
protected String iconPath;
protected String keyName;
protected String dataFieldName;
protected String resultsLimit;
public Autocompleter(ValueStack stack, HttpServletRequest request, HttpServletResponse response)
{
super(stack, request, response);
}
protected String getDefaultTemplate()
{
return "autocompleter";
}
public String getComponentName()
{
return COMPONENT_NAME;
}
public void evaluateExtraParams()
{
super.evaluateExtraParams();
if (forceValidOption != null)
addParameter("forceValidOption", findValue(forceValidOption, java/lang/Boolean));
if (searchType != null)
{
String type = findString(searchType);
if (type != null)
addParameter("searchType", type.toUpperCase());
}
if (autoComplete != null)
addParameter("autoComplete", findValue(autoComplete, java/lang/Boolean));
if (delay != null)
addParameter("delay", findValue(delay, java/lang/Integer));
if (disabled != null)
addParameter("disabled", findValue(disabled, java/lang/Boolean));
if (href != null)
{
addParameter("href", findString(href));
addParameter("mode", "remote");
}
if (dropdownHeight != null)
addParameter("dropdownHeight", findValue(dropdownHeight, java/lang/Integer));
if (dropdownWidth != null)
addParameter("dropdownWidth", findValue(dropdownWidth, java/lang/Integer));
if (formFilter != null)
addParameter("formFilter", findString(formFilter));
if (formId != null)
addParameter("formId", findString(formId));
if (listenTopics != null)
addParameter("listenTopics", findString(listenTopics));
if (notifyTopics != null)
addParameter("notifyTopics", findString(notifyTopics));
if (indicator != null)
addParameter("indicator", findString(indicator));
if (loadOnTextChange != null)
addParameter("loadOnTextChange", findValue(loadOnTextChange, java/lang/Boolean));
if (loadMinimumCount != null)
addParameter("loadMinimumCount", findValue(loadMinimumCount, java/lang/Integer));
if (showDownArrow != null)
addParameter("showDownArrow", findValue(showDownArrow, java/lang/Boolean));
else
addParameter("showDownArrow", Boolean.TRUE);
if (templateCssPath != null)
addParameter("templateCssPath", findString(templateCssPath));
if (iconPath != null)
addParameter("iconPath", findString(iconPath));
if (dataFieldName != null)
addParameter("dataFieldName", findString(dataFieldName));
if (keyName != null)
{
addParameter("keyName", findString(keyName));
} else
{
keyName = (new StringBuilder()).append(name).append("Key").toString();
addParameter("keyName", findString(keyName));
}
String keyNameExpr = (new StringBuilder()).append("%{").append(keyName).append("}").toString();
addParameter("key", findString(keyNameExpr));
if (resultsLimit != null)
addParameter("searchLimit", findString(resultsLimit));
}
protected Object findListValue()
{
return list == null ? null : findValue(list, java/lang/Object);
}
public void setAutoComplete(String autoComplete)
{
this.autoComplete = autoComplete;
}
public void setDisabled(String disabled)
{
this.disabled = disabled;
}
public void setForceValidOption(String forceValidOption)
{
this.forceValidOption = forceValidOption;
}
public void setHref(String href)
{
this.href = href;
}
public void setDelay(String searchDelay)
{
delay = searchDelay;
}
public void setSearchType(String searchType)
{
this.searchType = searchType;
}
public void setDropdownHeight(String height)
{
dropdownHeight = height;
}
public void setDropdownWidth(String width)
{
dropdownWidth = width;
}
public void setFormFilter(String formFilter)
{
this.formFilter = formFilter;
}
public void setFormId(String formId)
{
this.formId = formId;
}
public void setListenTopics(String listenTopics)
{
this.listenTopics = listenTopics;
}
public void setNotifyTopics(String onValueChangedPublishTopic)
{
notifyTopics = onValueChangedPublishTopic;
}
public void setIndicator(String indicator)
{
this.indicator = indicator;
}
public void setLoadMinimumCount(String loadMinimumCount)
{
this.loadMinimumCount = loadMinimumCount;
}
public void setLoadOnTextChange(String loadOnType)
{
loadOnTextChange = loadOnType;
}
public void setShowDownArrow(String showDownArrow)
{
this.showDownArrow = showDownArrow;
}
public void setList(String list)
{
super.setList(list);
}
public void setTemplateCssPath(String templateCssPath)
{
this.templateCssPath = templateCssPath;
}
public void setIconPath(String iconPath)
{
this.iconPath = iconPath;
}
public void setKeyName(String keyName)
{
this.keyName = keyName;
}
public void setDataFieldName(String dataFieldName)
{
this.dataFieldName = dataFieldName;
}
public void setResultsLimit(String resultsLimit)
{
this.resultsLimit = resultsLimit;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -