I am new to struts2 and need help with the struts2 jquery autocompleter tag
 


Have an object 

Publisher

code

description
 
 


In Action

getPublishers()
 


I am trying to use 2 dependable sj:autocompleter tags. In both it should 
display the Publishers list but

 in one it should display the description of publisher and in another it should 
display the code


If the user changes discription in one of the autocompleter then it should 
change the code and vise versa on the second autocompleter.
 


I am not not sure how the selected value goes to the action class. I'll want 
the selected publisher to be set to corresponding Publisher object selected to 
the selectedPublisherOfPublisherDescription attribute. 
 

How will it change the second autocompleter code on change of the first one. 
But, it's not working. Your help is appreciated.
 

I tried the below

                <sj:autocompleter

                                id="publisherDescriptionId"

                                name="publisherDescription"

                                
value="%{selectedPublisherOfPublisherDescription}"

                                list="%{publishers}"

                                listValue="description"

                                listKey="code"

                                selectBox="true"

                                selectBoxIcon="true"

                                label="Publisher Description"

                                onChangeTopics="publisherChange"

                     />

                     

                <sj:autocompleter

                                id="publisherCodeId"

                                name="publisherCode"

                                value="%{selectedPublisherOfMPublisherCode}"

                                list="%{publishers}"

                                listValue="code"

                                listKey="description"

                                selectBox="true"

                                selectBoxIcon="true"

                                label="Publisher Code"

                                listenTopics="publisherChange"
                                          

Reply via email to