1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22 package org.apache.struts2.dojo.views.jsp.ui;
23
24 import javax.servlet.http.HttpServletRequest;
25 import javax.servlet.http.HttpServletResponse;
26
27 import org.apache.struts2.components.Component;
28 import org.apache.struts2.dojo.components.Autocompleter;
29 import org.apache.struts2.views.jsp.ui.ComboBoxTag;
30
31 import com.opensymphony.xwork2.util.ValueStack;
32
33 /***
34 * @see Autocompleter
35 */
36 public class AutocompleterTag extends ComboBoxTag {
37 private static final long serialVersionUID = -1112470447573172581L;
38
39 protected String forceValidOption;
40 protected String searchType;
41 protected String autoComplete;
42 protected String delay;
43 protected String disabled;
44 protected String href;
45 protected String dropdownWidth;
46 protected String dropdownHeight;
47 protected String formId;
48 protected String formFilter;
49 protected String listenTopics;
50 protected String notifyTopics;
51 protected String indicator;
52 protected String loadOnTextChange;
53 protected String loadMinimumCount;
54 protected String showDownArrow;
55 protected String templateCssPath;
56 protected String iconPath;
57 protected String keyName;
58 protected String dataFieldName;
59 protected String beforeNotifyTopics;
60 protected String afterNotifyTopics;
61 protected String errorNotifyTopics;
62 protected String valueNotifyTopics;
63 protected String resultsLimit;
64 protected String transport;
65 protected String preload;
66 protected String keyValue;
67
68 public Component getBean(ValueStack stack, HttpServletRequest req, HttpServletResponse res) {
69 return new Autocompleter(stack, req, res);
70 }
71
72 protected void populateParams() {
73 super.populateParams();
74
75 Autocompleter autocompleter = (Autocompleter) component;
76 autocompleter.setAutoComplete(autoComplete);
77 autocompleter.setDisabled(disabled);
78 autocompleter.setForceValidOption(forceValidOption);
79 autocompleter.setHref(href);
80 autocompleter.setDelay(delay);
81 autocompleter.setSearchType(searchType);
82 autocompleter.setDropdownHeight(dropdownHeight);
83 autocompleter.setDropdownWidth(dropdownWidth);
84 autocompleter.setFormFilter(formFilter);
85 autocompleter.setFormId(formId);
86 autocompleter.setListenTopics(listenTopics);
87 autocompleter.setNotifyTopics(notifyTopics);
88 autocompleter.setIndicator(indicator);
89 autocompleter.setLoadMinimumCount(loadMinimumCount);
90 autocompleter.setLoadOnTextChange(loadOnTextChange);
91 autocompleter.setShowDownArrow(showDownArrow);
92 autocompleter.setTemplateCssPath(templateCssPath);
93 autocompleter.setIconPath(iconPath);
94 autocompleter.setKeyName(keyName);
95 autocompleter.setDataFieldName(dataFieldName);
96 autocompleter.setAfterNotifyTopics(afterNotifyTopics);
97 autocompleter.setBeforeNotifyTopics(beforeNotifyTopics);
98 autocompleter.setErrorNotifyTopics(errorNotifyTopics);
99 autocompleter.setValueNotifyTopics(valueNotifyTopics);
100 autocompleter.setResultsLimit(resultsLimit);
101 autocompleter.setTransport(transport);
102 autocompleter.setPreload(preload);
103 autocompleter.setKeyValue(keyValue);
104 }
105
106 public void setAutoComplete(String autoComplete) {
107 this.autoComplete = autoComplete;
108 }
109
110 public void setDisabled(String disabled) {
111 this.disabled = disabled;
112 }
113
114 public void setForceValidOption(String forceValidOption) {
115 this.forceValidOption = forceValidOption;
116 }
117
118 public void setHref(String href) {
119 this.href = href;
120 }
121
122 public void setDelay(String searchDelay) {
123 this.delay = searchDelay;
124 }
125
126 public void setSearchType(String searchType) {
127 this.searchType = searchType;
128 }
129
130 public void setDropdownHeight(String height) {
131 this.dropdownHeight = height;
132 }
133
134 public void setDropdownWidth(String width) {
135 this.dropdownWidth = width;
136 }
137
138 public void setFormFilter(String formFilter) {
139 this.formFilter = formFilter;
140 }
141
142 public void setFormId(String formId) {
143 this.formId = formId;
144 }
145
146 public void setListenTopics(String listenTopics) {
147 this.listenTopics = listenTopics;
148 }
149
150 public void setNotifyTopics(String onValueChangedPublishTopic) {
151 this.notifyTopics = onValueChangedPublishTopic;
152 }
153
154 public void setIndicator(String indicator) {
155 this.indicator = indicator;
156 }
157
158 public void setLoadMinimumCount(String loadMinimumCount) {
159 this.loadMinimumCount = loadMinimumCount;
160 }
161
162 public String getLoadMinimumCount() {
163 return loadMinimumCount;
164 }
165
166 public void setLoadOnTextChange(String loadOnTextChange) {
167 this.loadOnTextChange = loadOnTextChange;
168 }
169
170 public void setShowDownArrow(String showDownArrow) {
171 this.showDownArrow = showDownArrow;
172 }
173
174 public void setTemplateCssPath(String templateCssPath) {
175 this.templateCssPath = templateCssPath;
176 }
177
178 public void setIconPath(String iconPath) {
179 this.iconPath = iconPath;
180 }
181
182 public void setKeyName(String keyName) {
183 this.keyName = keyName;
184 }
185
186 public void setDataFieldName(String dataFieldName) {
187 this.dataFieldName = dataFieldName;
188 }
189
190 public void setAfterNotifyTopics(String afterNotifyTopics) {
191 this.afterNotifyTopics = afterNotifyTopics;
192 }
193
194 public void setBeforeNotifyTopics(String beforeNotifyTopics) {
195 this.beforeNotifyTopics = beforeNotifyTopics;
196 }
197
198 public void setErrorNotifyTopics(String errorNotifyTopics) {
199 this.errorNotifyTopics = errorNotifyTopics;
200 }
201
202 public void setValueNotifyTopics(String valueNotifyTopics) {
203 this.valueNotifyTopics = valueNotifyTopics;
204 }
205
206 public void setResultsLimit(String resultsLimit) {
207 this.resultsLimit = resultsLimit;
208 }
209
210 public void setTransport(String transport) {
211 this.transport = transport;
212 }
213
214 public void setPreload(String preload) {
215 this.preload = preload;
216 }
217
218 public void setKeyValue(String keyValue) {
219 this.keyValue = keyValue;
220 }
221 }