I have the following code to choose a double using the struts2 and jquery plugin:
Jsp:
& lt; S: url id = "ajaxActionUrl" value = "/ getStateCodesJson" /> & Lt; Sj: select name = "stateCodeId" id = "stateCodeId" id = "stateCodeId" label = "state" href = "% {ajaxActionUrl}" onChangeTopics = "reloadSecondSelect" list = "stateCodeList" list = "id" listValue = "label "EmptyOption =" true "header =" - 1 "header = value =" please select a state "/> & Lt; Sj: Select Name = "SubCode ID" id = "subCodeId" label = "sub-feature" href = "% {ajaxActionUrl}" formIds = "mapGeneratorForm" ReloadTipix = "ReloadSecond Selection" list = "subcodlist "List =" id "list value =" subcodeDescription "empty option =" correct "header =" - 1 "header = value =" please select a code "/>
, type = "jsn")}) Public string getStateCodesJson () throws an exception {stateCodeList = stateCodeService.getAll (); Collections.sort (stateCodeList); If (stateCodeId! = Null) {StateCode stateCode = stateCodeService.getById (stateCodeId); Subcodelist = subcodServeVisewat bastatcode (statcode); } Return Success; }
When jsp loads first, the getStateCodesJson () method is called 3 times however, after making changes, the operation is not called again That is why the second never comes.
Can someone help?
Jason
Instead of transferring the DAO, another list in action Handle the empty value of.
Use a single string 2 double selection tag.
Is a good example.
Comments
Post a Comment