On 06/06/2011 12:04 PM, robnangle wrote:
No didn't seem to make a difference im afraid. I cant think of anything that
would revert the user back to the previous logged in user?

My updated code now looks like:

         @SessionState(create=false)
        @Property
        private User user;
        @Property
        private boolean userExists;
        @Property
        private Transfers transfers;
        
        private boolean adminUser;
Don't know the rest of your code, but if this boolean adminUser determines whether or not show pages, it should be persisted shouldn't it? Otherwise the value set here is going to clear. When is UpdatePoints() called?

        @Inject
        private Request request;
        
        public UpdatePoints() {
                transfers = new Transfers();
                transfers.getTransferWeek();
                transfers.getCloseWeek();
                adminUser();
        }
        
        public boolean adminUser() {
                if(user.getUserType() != null&&
user.getUserType().equalsIgnoreCase("Admin")) {
                                adminUser = true;
                                setAdminUser(true);
                        }
                        else {
                                adminUser = false;                              
                        }
                return adminUser;
        }       

        public boolean getAdminUser() {
                return adminUser;
        }

        public void setAdminUser(boolean adminUser) {
                this.adminUser = adminUser;
        }
        
        public Object onSubmitFromLogout() throws Exception {
                user = null;
                Session session = request.getSession(false);
                if (session != null) {
                       session.invalidate();
                }
                return index;
        }


--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/Clearing-SessionState-tp4458525p4459081.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org

Reply via email to