errorPanel.setVisible(true);
activitySpinner.addClassName(StaticResourceBundle.INSTANCE.coreCss().displayNone());
errorPanel.add(new Label("Access to this group is restricted"));
errorPanel.add(new Label("To view this group's stream please request access from its coordinator"));
final SpinnerLabelButton button = new SpinnerLabelButton(new ClickHandler()
{
public void onClick(final ClickEvent inArg0)
{
GroupMembershipRequestModel.getInstance().insert(group.getShortName());
}
});
EventBus.getInstance().addObserver(InsertedRequestForGroupMembershipResponseEvent.class,
new Observer<InsertedRequestForGroupMembershipResponseEvent>()
{
public void update(final InsertedRequestForGroupMembershipResponseEvent inArg1)
{
button.disable();
EventBus.getInstance()
.notifyObservers(
new ShowNotificationEvent(new Notification(
"Your request for access has been sent")));
}
});
button.addStyleName(StaticResourceBundle.INSTANCE.coreCss().requestAccessButton());
errorPanel.add(button);
streamPanel.clear();
unseenActivityNotificationPanel.setActive(true);
}