List of usage examples for org.apache.wicket Component isVisibilityAllowed
public final boolean isVisibilityAllowed()
From source file:org.apache.isis.viewer.wicket.ui.pages.login.IsisSignInPanel.java
License:Apache License
private void setVisibilityAllowedBasedOnAvailableServices(final Component... components) { IsisContext.doInSession(new Runnable() { @Override/* w ww.j av a 2 s . c o m*/ public void run() { final UserRegistrationService userRegistrationService = lookupService( UserRegistrationService.class); final EmailNotificationService emailNotificationService = lookupService( EmailNotificationService.class); final boolean visibilityAllowed = userRegistrationService != null && emailNotificationService.isConfigured(); for (final Component component : components) { if (component.isVisibilityAllowed()) { component.setVisibilityAllowed(visibilityAllowed); } } } }); }