Try this:
<s:iterator begin="0" end="23" status="stat">
<option ><s:property value="%{#stat.index}" ></s:property>:00</option>
</s:iterator>
I simply added ":00" string in front of the s:property
tag.
Question
I need to append a ":00" value with the below code output in my jsp page.
<s:iterator begin="0" end="23" status="stat">
<option ><s:property value="%{#stat.index}" ></s:property></option>
</s:iterator>
the above code gives 0,1,2,... upto 23, but i need the output as 0:00 1:00 2:00... etc.
please help me
La solution
Try this:
<s:iterator begin="0" end="23" status="stat">
<option ><s:property value="%{#stat.index}" ></s:property>:00</option>
</s:iterator>
I simply added ":00" string in front of the s:property
tag.
Autres conseils
You can use
<option> <s:property value="%{#stat.index}"/> :00</option>
for your purpose.
So why you want check condition here?