You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Dimitris Mouchritsas <di...@eurodyn.com> on 2008/06/16 13:45:28 UTC
Provide a link from an error message
Hi again,
If you've been following my threads a bit you'll see that we're
developing an app using struts 1.2.4.
I have another question, we'd like to provide a link in some of the
error messages. But struts seems
to change < to <
I know that writing html in the ApplicationResources.properties file is
bad so I thought we'd use
parameters like:
{0}{1}{2} is required
Where {0} would be <a href="...">,
{1} the text for the link and
{2} </a>
but still struts converts < and >.
The code we use to display the errors is this:
<%-- Error messages --%>
<logic:messagesPresent message="false">
<div id="Message" class="Error">
<p><strong><bean:message key="error.occured" />:</strong></p>
<ul>
<html:messages id="msg" message="false">
<li>
<bean:write name="msg" />
</li>
</html:messages>
</ul>
<p class="Buttons">
<button id="MClose" type="submit"><bean:message
key="prompt.close" /></button>
</p>
</div>
</logic:messagesPresent>
Is there a way to do it?
Thanks
Dimitris
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: Provide a link from an error message
Posted by Dimitris Mouchritsas <di...@eurodyn.com>.
Dimitris Mouchritsas wrote:
> Hi again,
> If you've been following my threads a bit you'll see that we're
> developing an app using struts 1.2.4.
> I have another question, we'd like to provide a link in some of the
> error messages. But struts seems
> to change < to <
> I know that writing html in the ApplicationResources.properties file
> is bad so I thought we'd use
> parameters like:
> {0}{1}{2} is required
>
> Where {0} would be <a href="...">,
> {1} the text for the link and
> {2} </a>
>
> but still struts converts < and >.
>
> The code we use to display the errors is this:
> <%-- Error messages --%>
> <logic:messagesPresent message="false">
> <div id="Message" class="Error">
> <p><strong><bean:message key="error.occured" />:</strong></p>
> <ul>
> <html:messages id="msg" message="false">
> <li>
> <bean:write name="msg" />
> </li>
> </html:messages>
> </ul> <p class="Buttons">
> <button id="MClose" type="submit"><bean:message
> key="prompt.close" /></button>
> </p>
> </div>
> </logic:messagesPresent>
>
> Is there a way to do it?
>
> Thanks
> Dimitris
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
Never mind, found it, <bean write name="msg" filter="false" />.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org