On 17-12-2008 at 22:17, Nathan Maves wrote:
> is there a such thing?
> 
> is freddy book there is an example of using a SimpleMessage to display
> to the user...
> 
> public Resolution delete() {
>   Contact deleted = contactDao.read(contactId);
>   contactDao.delete(contactId);
>   getContext().getMessages().add(
>     new SimpleMessage("Deleted {0}.", deleted)
>   );
>   return new RedirectResolution(getClass());
> }
> 
> I am looking for a clean way to keep this message, which is in my
> stripes resources files, near the other messages/errors for this
> action bean.
> 
> I was hoping that
> http://stripes.sourceforge.net/docs/current/javadoc/net/sourceforge/stripes/validation/ScopedLocalizableError.html
> had a brother :)

ScopedLocalizableError has an extra scope that allows Stripes to search for
general error messages (as opposed to ActionBean or field specific ones).

For messages, this is not needed: they are always created by the programmer
(not Stripes) and thus the message key is always fully known.

In your situation, LocalizableMessage is probably sufficient.


Oscar

-- 
   ,-_  Oscar Westra van holthe - Kind      http://www.xs4all.nl/~kindop/
  /() )
 (__ (  Progress is made by lazy men looking for easier ways to do things.
=/  ()  -- Robert Heinlein

------------------------------------------------------------------------------
SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada.
The future of the web can't happen without you.  Join us at MIX09 to help
pave the way to the Next Web now. Learn more and register at
http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/
_______________________________________________
Stripes-users mailing list
Stripes-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/stripes-users

Reply via email to