Author: hermanns Date: Thu Nov 30 14:58:45 2006 New Revision: 481100 URL: http://svn.apache.org/viewvc?view=rev&rev=481100 Log: Autocompleter problems The dropdown of the autocompleter shows on the wrong place when the autocompleter.style.left.x != 0. Make autocompleter consistent with the other ajax tags attributes: o Add formId and formFilter to make it able to submit a form o Add beforeLoading and afterLoading o Add refreshListenTopic and onValueChangedPublishTopic o Add delay
Issue Number: WW-1529 Submitted by: Musachy Barroso Modified: struts/struts2/trunk/apps/showcase/src/main/resources/struts-ajax.xml struts/struts2/trunk/apps/showcase/src/main/webapp/ajax/autocompleter/index.jsp Modified: struts/struts2/trunk/apps/showcase/src/main/resources/struts-ajax.xml URL: http://svn.apache.org/viewvc/struts/struts2/trunk/apps/showcase/src/main/resources/struts-ajax.xml?view=diff&rev=481100&r1=481099&r2=481100 ============================================================================== --- struts/struts2/trunk/apps/showcase/src/main/resources/struts-ajax.xml (original) +++ struts/struts2/trunk/apps/showcase/src/main/resources/struts-ajax.xml Thu Nov 30 14:58:45 2006 @@ -43,17 +43,17 @@ <action name="toggle" class="org.apache.struts2.showcase.ajax.tree.Toggle"> <result>/ajax/tree/toggle.jsp</result> </action> - + <action name="example4"> <result type="freemarker">/ajax/tabbedpanel/example4.ftl</result> </action> - + <action name="example5" class="org.apache.struts2.showcase.ajax.Example5Action"> <result name="input">/ajax/tabbedpanel/example5.jsp</result> <result>/ajax/tabbedpanel/example5Ok.jsp</result> </action> </package> - + <package name="ajaxNoDecorate" namespace="/nodecorate" extends="struts-default"> <!-- example 4 --> <action name="panel1" class="org.apache.struts2.showcase.ajax.Example4ShowPanelAction" method="panel1"> @@ -71,5 +71,8 @@ <action name="panel3Submit" class="org.apache.struts2.showcase.ajax.Example4ShowPanelAction" method="panel3"> <result type="freemarker">/ajax/tabbedpanel/nodecorate/panel3Submit.ftl</result> </action> + <action name="AutocompleterExample" class="org.apache.struts2.showcase.ajax.AutocompleterExampleAction"> + <result type="freemarker">/ajax/options.ftl</result> + </action> </package> </struts> Modified: struts/struts2/trunk/apps/showcase/src/main/webapp/ajax/autocompleter/index.jsp URL: http://svn.apache.org/viewvc/struts/struts2/trunk/apps/showcase/src/main/webapp/ajax/autocompleter/index.jsp?view=diff&rev=481100&r1=481099&r2=481100 ============================================================================== --- struts/struts2/trunk/apps/showcase/src/main/webapp/ajax/autocompleter/index.jsp (original) +++ struts/struts2/trunk/apps/showcase/src/main/webapp/ajax/autocompleter/index.jsp Thu Nov 30 14:58:45 2006 @@ -13,21 +13,21 @@ Using a JSON list returned from an action (href="/JSONList.action"), without autoComplete (autoComplete="false") <br/> -<s:autocompleter theme="ajax" href="/JSONList.action" cssStyle="width: 200px;" autoComplete="false" id="ii"/> +<s:autocompleter theme="ajax" href="/JSONList.action" cssStyle="width: 200px;" autoComplete="false"/> <br/> <br/> Using a JSON list returned from an action (href="/JSONList.action"), with autoComplete (autoComplete="true") <br/> -<s:autocompleter theme="ajax" href="/JSONList.action" cssStyle="width: 200px;" autoComplete="true" id="ii"/> +<s:autocompleter theme="ajax" href="/JSONList.action" cssStyle="width: 200px;" autoComplete="true" /> <br/> <br/> Using a local list (list="{'apple','banana','grape','pear'}") <br/> -<s:autocompleter theme="simple" list="{'apple','banana','grape','pear'}" name="Aa" cssStyle="width: 150px;"/> +<s:autocompleter theme="simple" list="{'apple','banana','grape','pear'}" scssStyle="width: 150px;"/> <br/> <br/> @@ -50,6 +50,19 @@ <br/> <s:autocompleter theme="ajax" href="/JSONList.action" cssStyle="width: 200px;" disabled="true"/> +<br/> +<br/> + + + +Link two autocompleter elements. When the selected value in 'Autocompleter 1' changes, the available values in 'Autocompleter 2' will change also. +<br/> +<form id="selectForm"> + <p>Autocompleter 1 <s:autocompleter theme="simple" name="select" list="{'fruits','colors'}" value="colors" onValueChangedPublishTopic="/Refresh" forceValidOption="true"/></p> +</form> +Autocompleter 2 <s:autocompleter theme="ajax" href="/nodecorate/AutocompleterExample.action" autoComplete="false" formId="selectForm" refreshListenTopic="/Refresh" forceValidOption="true"/> + +<br/> <br/> <s:include value="../footer.jsp"/>