I have set the Struts 2 jquery auto complete tag forceValidOption
to false as:
<sj:autocompleter list="destinationAccounts" id="sample"
listKey="accountNo" name="toAccount"
listValue="%{accountNo + \" \" + firstName + \" \" + lastName }"
forceValidOption="false"/>
The forceValidOption
is not working and it forces the user to select from options and will auto-clean user entered data, when user leaves input.
The generated javascript is as:
var options_sample_widget = {};
options_sample_widget.hiddenid = "sample";
options_sample_widget.selectBox = true;
options_sample_widget.forceValidOption = false;
options_sample_widget.jqueryaction = "autocompleter";
options_sample_widget.id = "sample_widget";
options_sample_widget.name = "toAccount.accountNo_widget";
options_sample_widget.href = "#";
options_sample_widget.formids = "ownToOtherForm";
jQuery.struts2_jquery_ui.bind(jQuery('#sample_widget'),options_sample_widget);
It shows that the forceValidOption
is set.
Should I set other options to make it work?!
I have test it in the showcase and still I could not make it work.
If there is a bug here, can I use jQuery autocomplete function directly and disable this feature ?!