Saurabh
Saurabh

Reputation: 1406

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

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?

Upvotes: 1

Views: 1303

Answers (1)

Binay
Binay

Reputation: 159

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

Upvotes: 1

Related Questions