Hi All,
We have issue after upgrade to struts2-core-2.3.32 version
Action Method :
private List<ListOfValue> radioValueNum=new ArrayList<ListOfValue>();
public List<ListOfValue> getRadioValueNum() {
if(!radioValueNum.isEmpty()){
radioValueNum.clear();
radioValueNum.add(new
ListOfValue("1", getText("generic.yes")));
radioValueNum.add(new
ListOfValue("2", getText("generic.no")));
}
else{
radioValueNum.add(new
ListOfValue("1", getText("generic.yes")));
radioValueNum.add(new
ListOfValue("2", getText("generic.no")));
}
return radioValueNum;
}
JSP :
<s:radio id="radio1" name="individualVO.pren" label="radio1"
list="radioValueNum" listKey="id"
listValue="name"
onclick="javascript:handleRadioChange();" />
Generated HTML before strus upgrade 32 version (struts2-core-2.3.20.jar):
<input name="individualVO.pregnancyQuestion" value="1"
id="radio11" onclick="javascript:handleRadioChange();" type="radio">
<label for="radio11"
onclick="javascript:handleRadioChange();">Yes</label>
<input name="individualVO.pregnancyQuestion" checked="checked"
value="2" id="radio12" onclick="javascript:handleRadioChange();" type="radio">
<label for="radio12"
onclick="javascript:handleRadioChange();">No</label>
Generated HTML after strus upgrade 32 version (struts2-core-2.3.32.jar):
<input name="individualVO.pregnancyQuestion" value="1"
id="radio10" onclick="javascript:handleRadioChange();" type="radio">
<label for="radio10"
onclick="javascript:handleRadioChange();">Yes</label>
<input name="individualVO.pregnancyQuestion" checked="checked"
value="2" id="radio11" onclick="javascript:handleRadioChange();" type="radio">
<label for="radio11"
onclick="javascript:handleRadioChange();">No</label>
Here we have issue with ID generation for radio button .
Before upgrade, id's for radio button has been generated as id="radio11" and
id="radio12" [by appending id="radio1"+key value mentioned in the list
(radioValueNum).
After upgrade, id's for radio button has been generated as id="radio10" and
id="radio11". it looks like key value mentioned in the list is not appended
(index position is getting appended)
We just want to cross check that we are missing any jars as part of upgrade. or
it caused due to ognl jar fix.
Please guide us.
This message (including any attachments) contains confidential information
intended for a specific individual and purpose, and is protected by law. If you
are not the intended recipient, you should delete this message and any
disclosure, copying, or distribution of this message, or the taking of any
action based on it, by you is strictly prohibited.
v.E.1