Closed hss-ch closed 9 months ago
This should be already addressed, see #346 and #347
Addressed but not released because of #327
I just started the showcase locally with the latest Snapshot-Version. The problem is not solved. The tag sj:select with attribute autocomplete="true" is not working, without using sj:autocompleter tag in the same jsp page.
Could you post your code changes in Showcase to reproduce the bug?
/struts2-jquery-plugin/src/main/resources/template/js/struts2/jquery.struts2.js
select :
is missing the tooltip
"js/base/tooltip" + self.minSuffix + ".js"
if (o.autocomplete) { if (!self.loadAtOnce) { self.require( [ "js/base/widget" + self.minSuffix + ".js", "js/base/position" + self.minSuffix + ".js", "js/base/menu" + self.minSuffix + ".js", "js/base/button" + self.minSuffix + ".js", "js/base/autocomplete" + self.minSuffix + ".js" , "js/base/tooltip" + self.minSuffix + ".js" ]); } }
I used this code to use sj:select tag directly in jsp page. But it is not working.
<%@ taglib prefix="s" uri="/struts-tags" %>
<%@ taglib prefix="sj" uri="/struts-jquery-tags" %>
<h2>Autocompleter - Select Box</h2>
<p class="text">
Select Box with JSON Result as autocompleter.
</p>
<strong>Result Div :</strong>
<div id="formResult" class="result ui-widget-content ui-corner-all">Submit form bellow.</div>
<strong>Topics Div :</strong>
<div id="topics" class="result ui-widget-content ui-corner-all"></div>
<s:form id="form2" action="echo" theme="simple" cssClass="yform">
<fieldset>
<legend>Select Box with JSON Result as Autocompleter</legend>
<div class="type-select">
<label for="echo">Echo: </label>
<s:url var="jsoncustomers" action="jsoncustomers"/>
<sj:select
id="customersjson"
name="echo"
href="%{jsoncustomers}"
list="customers"
listValue="name"
listKey="id"
autocomplete="true"
loadMinimumCount="2"
onChangeTopics="autocompleteChange"
onFocusTopics="autocompleteFocus"
onSelectTopics="autocompleteSelect"
/>
</div>
<div>
<sj:submit
targets="formResult"
value="AJAX Submit"
indicator="indicator2"
button="true"
/>
<img id="indicator2" src="images/indicator.gif" alt="Loading..." style="display:none"/>
</div>
</fieldset>
</s:form>
I have tested your code and it works now with the fix.
Please can you try again with the latest snapshot.
Also make sure you clear your local storage for your site. In ff I do : edit settings, privacy & security, manage data and then remove by the website url.
I just tried the showcase of the latest Snapshot-Version.
The problem is solved.
Thank you.
Hi, I find this problem when I try to test Struts2 jQuery Plugin 5.0.4-SNAPSHOT.
The tag sj:select with attribute autocomplete="true" is not working, without using sj:autocompleter tag in the same jsp page.