1

I am using <sj:autocompleter> in my jsp page; whenever I select an element from dropdown list first time and click on submit then it works fine but when I again try to select an element from the list then, I am not able to select an element .

<td width="20%">
    <sj:autocompleter id="selectedHierCode" 
                    name="selectedHierCode" 
                    list="%{hierarchyMap}" 
               listValue="value" 
                 listKey="key" 
           selectBoxIcon="true" 
                   value="20" 
             placeholder="Select Hierarchy" 
             collapsible="False" 
                cssStyle="width:500px !important;" />
     <s:hidden name="screenModeCreate" id="screenModeCreate" value="true" />
</td>
<s:if test="%{#session['LoginVO'].selectedDeptId==2}">
    <s:hidden name="ynfileUpload" id="ynfileUpload" value="9"></s:hidden>
    <td width="20%"><s:label key="fileupload.singlefileupload" />
        <s:checkbox id="singleFileUpload" name="singleFileUpload" onclick="showFileTd(this);"></s:checkbox>
    </td>
    <td width="20%">
        <div id="fileTd">
            <fieldset>
                <legend>
                    <s:label key="fileupload.fileupload" cssClass="validate[required]"></s:label>
                </legend>
                <div><s:file name="fileUpload" id="fileUpload" style="float:left;" onchange="checkFileExtension();" />
                </div>
            </fieldset>
        </div>
    </td>
</s:if>
<s:else>
    <s:hidden name="ynfileUpload" id="ynfileUpload" value="10"></s:hidden>
</s:else>
<td width="30%">
    <%-- <sj:submit button="true" targets="masterCreationScreen" formIds="hierarchySelection"></sj:submit>--%>
    <sj:a id="ajaxformlink" cssClass="mdm-submit" onClickTopics="buttonClicked" 
          button="true" inidicator="indicator" effect="highlight">Submit</sj:a>

But when I use s:select instead of sj:autocompleter I am able to do reselection normally: the problem only comes when I use sj:autocompleter.

Andrea Ligios
  • 49,480
  • 26
  • 114
  • 243
  • Please define "not able to select an element": do you have any error ? – Andrea Ligios Nov 28 '14 at 10:46
  • "not able to select" means – Karan Saxena Nov 28 '14 at 10:48
  • You have no elements, you see the elements but they're not clickable, you select them but you can't post them, ecc... don't be naive, your question is not clear, please refine it – Andrea Ligios Nov 28 '14 at 10:50
  • "not able to select" means first time i can select an element from list normally like any drop down list functions ,and the bottom grid loads based on selection ,but if I want to change my current selection , then the I am not able to select any of the elements from the dropdown ,its a like a stuck dropdown where u cannot select any item, u can just view the dropdown elements till u reload the page .but everything is normal using – Karan Saxena Nov 28 '14 at 10:55
  • you are right ,i see the elements but they r not clickable ,,but it happens only second time after initial selection – Karan Saxena Nov 28 '14 at 10:56
  • I don't see where the grid reloading happens... where is the trigger ? In a script you didn't post ? Take a look [at this](http://stackoverflow.com/a/26518988/1654265) BTW (a different usage, but it works fine) – Andrea Ligios Nov 28 '14 at 12:48
  • (I also used [this](http://stackoverflow.com/q/20683308/573032) and it worked, but it's not related to your question.) – Roman C Nov 28 '14 at 17:06

0 Answers0