You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Haulyn Jason <ji...@yahoo.com> on 2008/10/17 09:12:13 UTC

How to access actionMessage and actionError in with freemarker

Hi,all
I want to write a custom tag to display <s:actionmessage> and <s:actionerror> in different style, so I write some freemarker page like this:
<@s.if test="%{actionMessages}">
    <div class="message">
        <@s.actionmessage />
    </div>
</...@s.if>
<@s.if test="%{actionErrors}">
    <div class="errors">
        <@s.actionerror />
    </div>
</...@s.if>

without the if logic, error messages can display in the right way but with all my hold code as upon,  it doesn't work. How I tried 
${actionMessages}, #actionMessages and all didn't work.

is that a way to judge does actionErrors or actionMessages exists?

 ---------------------------------------
Thanks!


Mobile: +086-15864011231
Website:http://www.openmotel.cn
http://www.vvthumb.com
GTalk:saharabear@gmail.com
Skype:saharabear


Haulyn Runner Jason