Hi,

I need to store the label values in the resource bundle ; and to support
screenreaders these values may have some <span> tags

ex : label.primaryapp.firstName=First name<span class="screaderstyle"> of
applicant</span>

Now, in s:label tag ; i'm using using it as :

<s:label value="%{getText('label.primaryNameAndAddress.lastName')}" for="
primaryapp.firstname" theme="mytheme"/>

Note that it's a custom theme with the escaping set to false.

<#if parameters.nameValue?exists>
<@s.property value="parameters.nameValue" escape="false"/><#t/>
</#if>

Please let me know if there's  a better way to do this -- we are migrating
from a Struts 1.x app and have to replace a lot of html:label tags ; so
it'll be good if the code is somewhat concise.

Thanks,
Joseph

Reply via email to