struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "j alex" <strutstwou...@gmail.com>
Subject S2 : using resource bundle values containing HTML in ui tags
Date Thu, 09 Aug 2007 16:01:38 GMT
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

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message