Zied,
-- GWT is not JSP. In JSP you're rendering tiles/facets/pages on demand, so it makes sense to add authorization restrictions directly into the tags. However GWT code is compiled down before runtime, so there is no foreknowledge of whether a user will meet the needed security roles at that time.
The proper way to do this is to have an initializer in your presenter that will take a user object and properly show/hide or enable/disable the components of interest at runtime display of your widget. If you want something similar to to Spring's @Secured annotation drive approach, see what Jen's has proffered. I've done this for various clients and it works well. Otherwise, you'll be reinventing the wheel for no good reason.
Sincerely,
Joseph
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.
No comments:
Post a Comment