struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Haulyn Jason <jia_hao...@yahoo.com>
Subject Re: How to access actionMessage and actionError in <s:component /> with freemarker
Date Fri, 17 Oct 2008 09:51:52 GMT
Hi,all
Thanks. I get it. I change my code as follow:
<#if (actionMessages?size>0)>
    <div class="message">
        <@s.actionmessage />
    </div>
</#if>

 Everything works well. I use freemarker syntax.

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


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


Haulyn Runner Jason



----- Original Message ----
From: Haulyn Jason <jia_haolin@yahoo.com>
To: struts-mail-list <user@struts.apache.org>
Sent: Friday, October 17, 2008 3:12:13 PM
Subject: How to access actionMessage and actionError in <s:component /> 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

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message