mirror of
https://github.com/apache/struts.git
synced 2026-08-07 15:46:57 +00:00
WW-1607
Generate remote and static autocompleter from the same freemarker template Fix autocompleter test git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@515424 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
@@ -1,4 +1,9 @@
|
||||
<input dojoType="struts:ComboBox"<#rt/>
|
||||
<#if parameters.href?exists>
|
||||
<input dojoType="struts:ComboBox"<#rt/>
|
||||
dataUrl="${parameters.href}"<#rt/>
|
||||
<#else>
|
||||
<select dojoType="struts:ComboBox"<#rt/>
|
||||
</#if>
|
||||
<#if parameters.id?if_exists != "">
|
||||
id="${parameters.id?html}"<#rt/>
|
||||
</#if>
|
||||
@@ -8,9 +13,6 @@
|
||||
<#if parameters.cssStyle?if_exists != "">
|
||||
style="${parameters.cssStyle?html}"<#rt/>
|
||||
</#if>
|
||||
<#if parameters.href?if_exists != "">
|
||||
dataUrl="${parameters.href}"<#rt/>
|
||||
</#if>
|
||||
<#if parameters.forceValidOption?exists>
|
||||
forceValidOption="${parameters.forceValidOption?string?html}"<#rt/>
|
||||
</#if>
|
||||
@@ -91,6 +93,34 @@
|
||||
</#if>
|
||||
<#include "/${parameters.templateDir}/simple/scripting-events.ftl" />
|
||||
>
|
||||
<#if parameters.list?exists>
|
||||
<#if (parameters.headerKey?exists && parameters.headerValue?exists)>
|
||||
<option value="${parameters.headerKey?html}">${parameters.headerValue?html}</option>
|
||||
</#if>
|
||||
<#if parameters.emptyOption?default(false)>
|
||||
<option value=""></option>
|
||||
</#if>
|
||||
<@s.iterator value="parameters.list">
|
||||
<#if parameters.listKey?exists>
|
||||
<#assign tmpListKey = stack.findString(parameters.listKey) />
|
||||
<#else>
|
||||
<#assign tmpListKey = stack.findString('top') />
|
||||
</#if>
|
||||
<#if parameters.listValue?exists>
|
||||
<#assign tmpListValue = stack.findString(parameters.listValue) />
|
||||
<#else>
|
||||
<#assign tmpListValue = stack.findString('top') />
|
||||
</#if>
|
||||
<option value="${tmpListKey?html}"<#rt/>
|
||||
<#if (parameters.nameValue?exists && parameters.nameValue == tmpListKey)>
|
||||
selected="selected"<#rt/>
|
||||
</#if>
|
||||
><#t/>
|
||||
${tmpListValue?html}<#t/>
|
||||
</option><#lt/>
|
||||
</@s.iterator>
|
||||
</select>
|
||||
</#if>
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -60,7 +60,6 @@ public class AutocompleterTest extends AbstractUITagTest {
|
||||
tag.setDisabled("false");
|
||||
tag.setForceValidOption("false");
|
||||
tag.setList("{'d','e'}");
|
||||
tag.setHref("a");
|
||||
tag.setDropdownWidth("10");
|
||||
tag.setDropdownHeight("10");
|
||||
tag.setDelay("100");
|
||||
|
||||
+1
-1
@@ -1,7 +1,6 @@
|
||||
<select
|
||||
dojoType="struts:ComboBox"
|
||||
id="f"
|
||||
dataUrl="a"
|
||||
forceValidOption="false"
|
||||
searchType="B"
|
||||
autoComplete="true"
|
||||
@@ -10,6 +9,7 @@
|
||||
dropdownHeight="10"
|
||||
name="f"
|
||||
keyName="fKey"
|
||||
visibleDownArrow="true"
|
||||
buttonSrc="i"
|
||||
templateCssPath="j"
|
||||
>
|
||||
|
||||
Reference in New Issue
Block a user