struts2 - Not able to add a value dynamically in select tag using struts 2 -
struts2 - Not able to add a value dynamically in select tag using struts 2 -
its simple question, yet not able find solution. i'm able print value without 0's in page, not able bind values select tag in options.
my code
${sa.replace("0", "")} displays numbers without 0's
but, options values doesn't display in ui
<option value="<s:property value="%{#sa}"/>" <s:if test="%{#sa == #sumassured.tostring()}"> selected="" </s:if> > <span class="eurosymbol formatamount"><span> <s:property value="%{#sa.replace('0','')}"/></span></span> </option>
to utilize objects in ognl, object should in value stack. can utilize attr
object search in other scopes.
<option value="<s:property value='%{#attr.sa}'/>" <s:if test="%{#attr.sa == #attr.sumassured.tostring()}"> selected="selected"</s:if>> <span class="eurosymbol formatamount"><span><s:property value="%{#attr.sa.replace('0','')}"/></span></span> </option>
struts2 jsp-tags
Comments
Post a Comment