Struts 2 jquery autocompleter with forceValidOption=“false”

て烟熏妆下的殇ゞ 提交于 2019-12-01 11:17:54

The autocompleter without href attribute is used to load a static list.

If it's used with selectBox="true", it renders select tag to hold its options and two input fields: one is a hidden field which value is submitted, and another is a combobox. The value from this field should be set to a hidden field. To make it work you should set the following function

$(".s2j-combobox-input.ui-autocomplete-input").keyup(function(e){
  $("#sample").val($(".s2j-combobox-input.ui-autocomplete-input").val())
});
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!