开发者

Populating some fields after selecting the element using Struts2-Dojo autocompleter

开发者 https://www.devze.com 2023-02-18 03:00 出处:网络
I am using sx tag i.e. struts-dojo-tag of struts 开发者_如何学运维2 to autosuggest one field on one page. It is working fine. Now I want to populate other fields on the same page based on the selectio

I am using sx tag i.e. struts-dojo-tag of struts 开发者_如何学运维2 to autosuggest one field on one page. It is working fine. Now I want to populate other fields on the same page based on the selection of autosuggest field. I tried calling javascript on the above field on various events like onselect, onchange,etc with no success.

JSP code :

<sx:autocompleter autoComplete="true" listKey="id" listValue="brandName" name="brand.brandName" id="brandName" cssClass="textfield" list="brandList" onchange="populateInfo(this.value);"></sx:autocompleter>

here I want to autosuggest brandNames available and on selecting the brand, I want to populate data regarding the brand in some others fields. I tried calling java script function populateInfo(), but the function is not getting called.

Can you please help me out?


I think this problem can be solved by using select tag of struts2-jquery. You can have a look in these showcase

0

精彩评论

暂无评论...
验证码 换一张
取 消