ActionErrors: how to keep messages in the database

N

nkunkov

Hello!
I'm creating action errors for my web page in the following way:

ActionErrors errors = new ActionErrors();
errors.add("message123", new
ActionMessage("error.required.thisfield"));

A constructor of ActionMessage recieves a key to a message resource
"error.required.thisfield".
The message resource is usually a file.

I would like to store my error messages in the database. How would I
instantiate the ActionMessage in that case? Or I will have to create
ActionErrors in a different way?
Any help on how to use database instead of a resource file for error
messages text would be appreciated.


Thank you
NK
 
S

sameergn

Hello!
I'm creating action errors for my web page in the following way:

ActionErrors errors = new ActionErrors();
errors.add("message123", new
ActionMessage("error.required.thisfield"));

A constructor of ActionMessage recieves a key to a message resource
"error.required.thisfield".
The message resource is usually a file.

I would like to store my error messages in the database. How would I
instantiate the ActionMessage in that case? Or I will have to create
ActionErrors in a different way?
Any help on how to use database instead of a resource file for error
messages text would be appreciated.

Thank you
NK

See if this helps.
http://sourceforge.net/project/shownotes.php?release_id=320056&group_id=49385
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Staff online

Members online

Forum statistics

Threads
473,995
Messages
2,570,228
Members
46,818
Latest member
SapanaCarpetStudio

Latest Threads

Top