Created
February 11, 2013 20:53
-
-
Save mikebrock/4757524 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @EntryPoint | |
| @Templated | |
| public class HelloWorldForm extends Composite { | |
| @Inject @Admin @DataField Button deleteButton; | |
| @Inject SessionManager sessionManager; | |
| @EventHandler("deleteButton") | |
| private void handleSendClick(ClickEvent event) { | |
| // do some deleting! | |
| } | |
| @Admin | |
| private void applyAdminStyling(Style style) { | |
| if (!sessionManager.isAdmin()) { | |
| style.setVisibility(Style.Visibility.HIDDEN); | |
| } | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment