Hi GWT gurus,

Learning the new GWT 2.1 framework and I got security up&running on my
GAE application.
Now working with the new Activities/Places.

My applicaiton will have a login/logout link in the top right of the
website/app.

How do I keep this link in sync with the security status of the
current visitor/user.
Will every activity have to check for the status of the of current
user ?

Do I create a super class AbstractMyApplicationActivity that
implements this functionality and then call this in start() for each
child activity ?

like this
public AbstractMyApplicationActivity extends AbstractActivity {
    public void updateLoginLogoutLink() {
       // set the login/logout link correctly
    }
}

public SomeActivity extends AbstractMyApplicationActivity {
    public void start(AcceptsOneWidget containerWidget, EventBus
eventBus)  {
     updateLoginLogoutLink()
     ... some other activity specific stuff.
    }
}

Is there a more elegant pattern for implementing this? Now the
responsibility of making this calling is present in every activity....
feels uncomfortable;

thx,

koen

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.

Reply via email to