html - Use global-messages.properties with Struts2 label tag -
normally use html label label fields follows
<div class="col-sm-2 col-xs-12"> <label class="pull-right"> <s:text name="fax"></s:text>: </label> </div> <div class="col-sm-3 col-xs-12 text-left"> <s:property value="organizationinfo.fax"/> </div>
where fax
defined in global-messages.properties
file. need use struts2
<s:label>
inside of <s:iterator>
each label have unique id connect each field. tried several ways including following
<s:iterator value="chosenshipperviewlist" status="status"> <div class="col-sm-2 col-xs-12 "> <s:label for="%{'deleteshipper'+#status.index}" class="pull-right"> <s:text name="deleteshipperinfo"></s:text>: </s:label> </div> <div class="col-sm-3 col-xs-12 text-left"> <s:url var="deletelink" action="shipment_deleteshipperfromchosenshipperviewlist"> <s:param name="shippername" value="%{organizationinfo.orgname}"></s:param> <s:param name="typeofshipmentid" value="typeofshipmentid"></s:param> </s:url> <s:a id="%{'deleteshipper'+#status.index}" href="%{deletelink}"> <img src="/llr/theme/delete.gif" width="16" height="16" alt="map red x" > </s:a> </div> </s:iterator>
i never struts
generate html
label
using label value global-messages.properties
file. appreciated!
use standard html tag:
<label for='<s:property value="%{'deleteshipper'+#status.index}" />' class="pull-right"> <s:text name="deleteshipperinfo"></s:text>: </label>
or drop <s:text>
, use key
:
<s:label key="deleteshipperinfo" for="%{'deleteshipper'+#status.index}" class="pull-right" />
Comments
Post a Comment