In my jsp file I set the value of the variable statusNum. When I am trying to pass the value of statusNum
to the method getStatusString()
(this method is defined in Action class) the value of statusNum
is null. But when I displayed using ${statusNum}
I am getting the value. Here is my code.
<table style="width: 100%;">
<s:iterator value="emailList">
<tr>
<td style="width:39%"><s:property value='name'/></td>
<td style="width:39%;"><s:property value='email'/></td>
<s:set var="statusNum"><s:property value="status"/></s:set>
${statusNum}
<s:set var="stringNum" value="%{getStatusString(#statusNum)}"/>
</tr>
</s:iterator>
</table>
here is skeleton of getStatusString() method in Action class
public String getStatusString(Integer sendStatus) {
-------------
------------- //code returning string value
-------------
}
Please help me to get the status String value corresponding to the statusNum
through the method getStatusString()
.