UiBinder eventually just ends up writing the javacode, so feel free to use 
straight java when it makes sense. You could definitely employ this strategy 
here, but there is a 3rd option, if you're rolling with MVP, it would be 
pretty easy to have each presenter check to see if it has rights, and if it 
does, add its view to the TabLayoutPanel.

If you really wanted to use uibinder, you probably would be surprised by how 
speedy it is to add widgets and then remove the ones that you don't want. 

You could also create an interface... something like

interface IsAuthorized extends IsWidget{
    boolean isAuthorized();
}

Then create a composite that uses TabLayoutPanel as the backing widget and 
only expose teh methods you want on TabLayoutPanel, and before any widget 
gets attached to TabLayoutPanel, you check to see if it isAuthorized(). If 
you're authorized, add the widget to the panel. If not, don't.

I'm sure there are plenty of other strategies as well. 

-- 
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