Skip to content

Instantly share code, notes, and snippets.

@mikebrock
Created February 11, 2013 20:53
Show Gist options
  • Select an option

  • Save mikebrock/4757524 to your computer and use it in GitHub Desktop.

Select an option

Save mikebrock/4757524 to your computer and use it in GitHub Desktop.
@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