[prev in list] [next in list] [prev in thread] [next in thread] 

List:       struts-user
Subject:    Re: struts-faces
From:       Ted Husted <husted () apache ! org>
Date:       2003-09-18 11:05:44
[Download RAW message or body]

Craig R. McClanahan wrote:
 >     // Return an Action for processing a logon
 >     public Action getLogon() {
 >       return new Action() {
 >         public String invoke() {
 >           return logon();
 >         }
 >       }
 >     }
 >

Very cool technique =:)

But this has to be the coolest trick yet:

 >         // Add an error message
 >         FacesContext.getCurrentInstance().addMessage(...);

Hey, why bother passing around a context when you can get the thread to 
do it? Quite fancy =:)

http://java.sun.com/webservices/docs/1.2/api/javax/faces/context/FacesContext.html

-Ted.



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

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic