Re: Obtain the data inside RequestGlobals question

2009-06-09 Thread Otho
I usually use Spring Security. No need to maintain a sessionstate object myself then.:) But if Neo Anderson really insists of writing his own auth system it could be handy indeed. 2009/6/9 Thiago H. de Paula Figueiredo > On Tue, Jun 9, 2009 at 8:51 AM, Otho wrote: > > Or did I get you totally wr

Re: Obtain the data inside RequestGlobals question

2009-06-09 Thread Thiago H. de Paula Figueiredo
On Tue, Jun 9, 2009 at 8:51 AM, Otho wrote: > Or did I get you totally wrong? You did totally right. Maybe you would also store user information in the session for later user. ;) -- Thiago - To unsubscribe, e-mail: users-unsubs

Re: Obtain the data inside RequestGlobals question

2009-06-09 Thread Thiago H. de Paula Figueiredo
On Tue, Jun 9, 2009 at 7:11 AM, Neo Anderson wrote: > What I want to do is to perform authentication function; but would like auth > logic to be separated from Page file. So the auth function can be reused > next time if other front end client needs it. > Then I searched on the tapestry website an

Re: Obtain the data inside RequestGlobals question

2009-06-09 Thread Otho
That seems a very complicated way to do it. public interface AuthService() { public boolean authenticate(User user); } publlic class AuthServiceImpl() { public boolean authenticate (User user) { // authenticate and return true on success } } In your appmodule binder.bind(AuthService.

Re: Obtain the data inside RequestGlobals question

2009-06-09 Thread Neo Anderson
What I want to do is to perform authentication function; but would like auth logic to be separated from Page file. So the auth function can be reused next time if other front end client needs it. Then I searched on the tapestry website and found that seemingly it is achieved by using Dispatcher

Re: Obtain the data inside RequestGlobals question

2009-06-08 Thread Thiago H. de Paula Figueiredo
Em Mon, 08 Jun 2009 19:42:14 -0300, Neo Anderson escreveu: I run the code and request.getAttribute(USER) returns null in dispatch() function. So I output the Request to see what happens; then notice that they (Request in Login.java Page and AccessController.java) are two difference objec

Re: Obtain the data inside RequestGlobals question

2009-06-08 Thread Neo Anderson
a Figueiredo > Subject: Re: Obtain the data inside RequestGlobals question > To: "Tapestry users" > Date: Monday, 8 June, 2009, 9:49 PM > Em Mon, 08 Jun 2009 18:40:42 -0300, > Neo Anderson > escreveu: > > > What way is the correct method to set data in the > R

Re: Obtain the data inside RequestGlobals question

2009-06-08 Thread Thiago H. de Paula Figueiredo
Em Mon, 08 Jun 2009 18:40:42 -0300, Neo Anderson escreveu: What way is the correct method to set data in the Request object in Page and retrieve it back from dispatch function? Have you really tested the result of that code instead of just comparing the two Request instances? By the wa

Re: Obtain the data inside RequestGlobals question

2009-06-08 Thread Neo Anderson
I try to use org.apache.tapestry5.services.Request.setAttribute() in Login.java Page public class Login { @Inject private Request request; Object onSubmitFromLogin(){ ... request.setAttribute( org.je

Re: Obtain the data inside RequestGlobals question

2009-06-05 Thread Thiago H. de Paula Figueiredo
Em Fri, 05 Jun 2009 17:36:39 -0300, Neo Anderson escreveu: I following the mailing list at http://markmail.org/message/t5sopnse2wgqms7u#query:accessing%20requestglobals%20inside%20dispatcher%20and%20other%20data%20support%20classes+page:1+mid:ks77ayww62mra7in+state:results, trying to obtain

Re: Obtain the data inside RequestGlobals question

2009-06-05 Thread Neo Anderson
Sorry, a minor correction. User (... requestGlobals.getRequest().getAttribute(USER); ... in AccessController.java) is a key (String) which is the same as "user" in Login.java Also, I can see the User object set in RequestGlobals in Login.java, but I can NOT see the User object when obtaining