velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "kimbuba" <kimbu...@yahoo.it>
Subject Velocity-Struts custom error message.
Date Fri, 17 Oct 2003 15:15:39 GMT
Hello All.
First i thnx a lot for providing this exellent tool for rendering struts
view layer.
I really enjoy on writing single property keywords instead of <bean:wr.....
(like old phpLib templates).

I got a little question:
when a field give me error i'd like to specify which file i want instead of
the ApplicationResources one.

In struts instead of:
web.xml:
    <init-param>
      <param-name>application</param-name>
      <param-value>ApplicationResources</param-value>
    </init-param>

i prefer to put directly on my struts-config:
  <message-resources key="errors"
parameter="it.kimbuba.webapps.struts_vel.config.errors" null="false"/>
[... others resource files.]

then in case of error i'll use:

 <html:errors bundle="errors"/>

struts than will go and find
struts_vel\WEB-INF\classes\it\kimbuba\webapps\struts_vel\config\errors.prope
rties


Is there any way to do this with velocity?
i tried  $errors.getMsgs("errors") but with no result.
how can i specify which boundle to look at?

thnx in advance.
Kim.




---------------------------------------------------------------------
To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: velocity-user-help@jakarta.apache.org


Mime
View raw message