@Override public void setWidget(IsWidget w) { // Activity manager may give w=null to clear/kill the view first // Then assign the next view // like DeckLayoutPanel.setWidget() can receive null to clear all children container.clear(); if (w != null) { container.add(w); } }
public void initLayout() { panel.clear(); LoadingDialog sayLoading = new LoadingDialog(); panel.add(sayLoading); AsyncCallback<TermMoveObject> callback = new AsyncCallback<TermMoveObject>() { public void onSuccess(TermMoveObject results) { termMoveObj = results; panel.clear(); panel.add(getTable(results)); } public void onFailure(Throwable caught) { ExceptionManager.showException(caught, constants.conceptDeleteTermFail()); } }; Service.conceptService.loadMoveTerm( MainApp.userOntology, tObj.getUri(), conceptObject.getUri(), callback); }
public void refresh() { Resources _resources = Domeo.resources; try { init(); uriField.setValue(_resource.getUrl()); // sourceField.add(new HTML("<img src='" + Domeo.resources.externalLinkIcon().getURL() + "'/> // <a href='" + // _resource.getSource().getHomepage() + "' target='_blank'>"+_resource.getSource().getName() // + "</a> ")); String synonyms = _resource.getIsAbout().getSynonyms(); aboutField.add( new HTML( _resource.getIsAbout().getLabel() + " " + (_resource.getIsAbout().getSynonyms() != null ? synonyms : ""))); if (_domeo.getExtractorsManager().isExtractorDefined()) { urlImage.setResource(_resources.checkIcon()); urlImage.setTitle( "Known resource, executed extractor '" + _domeo.getExtractorsManager().getExtractorLabel() + "'"); urlImage.setVisible(true); } else { urlImage.setVisible(false); } if (_resource != null) { extractionProvenanceImage.setUrl( Domeo.resources.pluginsGrayLittleIcon().getSafeUri().asString()); extractionProvenanceImage.setTitle(_resource.getCreator().getName()); extractorProvenanceDetails.setText("Extracted by " + _resource.getCreator().getName()); extractionSourceDetails.setHTML( "Source <a href='" + _resource.getSource().getHomepage() + "' target='_blank'> <img src='" + Domeo.resources.externalLinkIcon().getSafeUri().asString() + "'/> " + _resource.getSource().getName() + "</a>"); extractionDateDetails.setText("On " + _resource.getFormattedCreationDate()); } } catch (Exception e) { _domeo .getLogger() .exception(this, "Exception while rendering OpenTrials resource info " + e.getMessage()); body.clear(); body.add( new HTML( "<img src='" + _resources.crossLittleIcon().getSafeUri().asString() + "'/> Exception while rendering OpenTrials resource info " + e.getMessage())); } // References try { CitationReferencesPanel p = new CitationReferencesPanel(_domeo, false); referencesPanel.clear(); referencesPanel.add(p); } catch (Exception e) { _domeo .getLogger() .exception(this, "Exception while rendering resource info " + e.getMessage()); referencesPanel.clear(); referencesPanel.add( new HTML( "<img src='" + _resources.crossLittleIcon().getSafeUri().asString() + "'/> Exception while rendering PubMed resource info " + e.getMessage())); } // Generic Document Resource try { LDocumentResourceCardPanel d = new LDocumentResourceCardPanel(_domeo); d.initializeLens(_resource, _parameters); contentPanel.clear(); contentPanel.add(d); } catch (Exception e) { _domeo .getLogger() .exception(this, "Exception while rendering resource info " + e.getMessage()); body.clear(); body.add( new HTML( "<img src='" + _resources.crossLittleIcon().getSafeUri().asString() + "'/> Exception while rendering OpenTrials resource info " + e.getMessage())); } }