// ------------------------------------------------------------------------------------- public void updateFileContent() { if (listFiles.getSelectedIndex() != -1) { service = (ServiceManagerWebServiceAsync) Registry.get("guiservice"); service.getFile( LeftPanelLogin.session_id, selectedComponent, listFiles.getSimpleValue(), new AsyncCallback<String>() { @Override public void onFailure(Throwable caught) { Dispatcher.forwardEvent(MainEvents.error, caught); } @Override public void onSuccess(String result) { if (result != null) { if (!result.equals(currentOutput)) { output.setValue(result); } } else { removeAll(); ((TextArea) textArea) .setValue( "Session time elapsed! Please log out, log in again and refresh the selected option"); add(textArea); layout(true); } } }); } else { output.setEmptyText("Please select a file to display."); } }