/** * Called when the loading state changes. * * @param state the new loading state */ @Override protected void onLoadingStateChanged(LoadingState state) { Widget message = null; if (state == LoadingState.LOADING) { // Loading indicator. message = loadingIndicatorContainer; } else if (state == LoadingState.LOADED && getPresenter().isEmpty()) { // Empty table. message = emptyListWidgetContainer; } // Switch out the message to display. if (message != null) { messagesPanel.showWidget(messagesPanel.getWidgetIndex(message)); } // Show the correct container. showOrHide(getChildContainer(), message == null); messagesPanel.setVisible(message != null); // Fire an event. super.onLoadingStateChanged(state); }
/** * Set's the form operational is not suppressed by RBAC * @param isOperational */ protected void setOperational(boolean isOperational) { if (edit != null && !edit.getElement().hasClassName(RBAC_SUPPRESSED)) { if(isOperational) edit.getElement().getStyle().setDisplay(Style.Display.INLINE); else edit.getElement().getStyle().setDisplay(Style.Display.NONE); } if (reset != null && !reset.getElement().hasClassName(RBAC_SUPPRESSED)) { if(isOperational) reset.getElement().getStyle().setDisplay(Style.Display.INLINE); else reset.getElement().getStyle().setDisplay(Style.Display.NONE); resetPanel.setVisible(isOperational); } }
/** * Called when the loading state changes. * * @param state the new loading state */ @Override protected void onLoadingStateChanged(LoadingState state) { Widget message = null; if (state == LoadingState.LOADING) { // Loading indicator. message = loadingIndicatorContainer; } else if (state == LoadingState.LOADED && getPresenter().isEmpty()) { // Empty table. message = emptyListWidgetContainer; } // Switch out the message to display. if (message != null) { messagesPanel.showWidget(messagesPanel.getWidgetIndex(message)); } // Show the correct container. showOrHide(getChildContainer(), message == null); messagesPanel.setVisible(message != null); // Fire an event. super.onLoadingStateChanged(state); }
/** * Called when the loading state changes. * * @param state the new loading state */ @Override protected void onLoadingStateChanged(LoadingState state) { Widget message = null; if (state == LoadingState.LOADING) { // Loading indicator. message = loadingIndicatorContainer; } else if (state == LoadingState.LOADED && getPresenter().isEmpty()) { // Empty table. message = emptyListWidgetContainer; } // Switch out the message to display. if (message != null) { messagesPanel.showWidget(messagesPanel.getWidgetIndex(message)); } // Show the correct container. showOrHide(getChildContainer(), message == null); messagesPanel.setVisible(message != null); // Fire an event. super.onLoadingStateChanged(state); }