@Override public void render(Context context, CandidateGeneListProxy value, SafeHtmlBuilder sb) { if (value == null) return; placeRequest.with("id", value.getId().toString()); SafeUri link = UriUtils.fromTrustedString("#" + placeManager.buildHistoryToken(placeRequest.build())); SafeHtml name = SafeHtmlUtils.fromString(value.getName()); SafeHtmlBuilder builder = new SafeHtmlBuilder(); builder .append(SafeHtmlUtils.fromSafeConstant("created on ")) .append( SafeHtmlUtils.fromString( DateTimeFormat.getFormat(DateTimeFormat.PredefinedFormat.DATE_SHORT) .format(value.getCreated()))) .append(SafeHtmlUtils.fromSafeConstant(" by ")) .append( SafeHtmlUtils.fromString( value.getOwnerUser().getFirstname() + " " + value.getOwnerUser().getLastname())); sb.append(templates.cell(link, name, builder.toSafeHtml())); }
@Override protected void onReveal() { super.onReveal(); if (isStoryDetails) { tagsPresenter.setSearchTagHandler(this); addVisibleHandler(CreateContentEvent.TYPE, this); getView().setForStoryDetails(); } else { tagsPresenter.setSearchTagHandler(null); String historyToken = placeManager.buildHistoryToken(getStoryDetailsPlaceRequestBuilder(false, false).build()); getView().setForStoryCard(historyToken); } if (isEditMode) { StorySummary openedStoryData = cachingService.getCachedObject(StorySummary.class, CachedObjectKeys.OPENED_STORY); doEdit(openedStoryData); } }
private void initTree() { String section_key = "section"; String subsection_key = "subsection"; TreeItem root = new TreeItem("Help"); PlaceRequest rootPlace = new PlaceRequest(NameTokens.helpPage); tree.addItem( new Hyperlink( "Introduction", placeManager.buildHistoryToken(rootPlace.with(section_key, "introduction")))) .setUserObject("introduction"); // Phenotypes TreeItem phenotypes_item = new TreeItem( new Hyperlink( "Phenotypes", placeManager.buildHistoryToken(rootPlace.with(section_key, "phenotypes")))); phenotypes_item.setUserObject("phenotypes"); phenotypes_item .addItem( new Hyperlink( "Uploading Phenotypes", placeManager.buildHistoryToken( rootPlace.with(section_key, "phenotypes").with(subsection_key, "upload")))) .setUserObject("phenotypes_upload"); phenotypes_item .addItem( new Hyperlink( "Phenotype Format", placeManager.buildHistoryToken( rootPlace.with(section_key, "phenotypes").with(subsection_key, "format")))) .setUserObject("phenotypes_format"); tree.addItem(phenotypes_item); // Accessions TreeItem accession_item = new TreeItem( new Hyperlink( "Accessions", placeManager.buildHistoryToken(rootPlace.with(section_key, "accessions")))); accession_item.setUserObject("accessions"); tree.addItem(accession_item); // Analysis TreeItem analysis_item = new TreeItem( new Hyperlink( "Analysis", placeManager.buildHistoryToken(rootPlace.with(section_key, "analysis")))); analysis_item.setUserObject("analysis"); analysis_item .addItem( new Hyperlink( "Navigation", placeManager.buildHistoryToken( rootPlace.with(section_key, "analysis").with(subsection_key, "navigation")))) .setUserObject("analysis_navigation"); analysis_item .addItem( new Hyperlink( "Phenotypes", placeManager.buildHistoryToken( rootPlace.with(section_key, "analysis").with(subsection_key, "phenotypes")))) .setUserObject("analysis_phenotypes"); analysis_item .addItem( new Hyperlink( "Datasets", placeManager.buildHistoryToken( rootPlace.with(section_key, "analysis").with(subsection_key, "datasets")))) .setUserObject("analysis_datasets"); analysis_item .addItem( new Hyperlink( "Transformations", placeManager.buildHistoryToken( rootPlace .with(section_key, "analysis") .with(subsection_key, "transformations")))) .setUserObject("analysis_transformations"); analysis_item .addItem( new Hyperlink( "Results", placeManager.buildHistoryToken( rootPlace.with(section_key, "analysis").with(subsection_key, "results")))) .setUserObject("analysis_results"); tree.addItem(analysis_item); // Tutorial /*TreeItem tutorial_item = new TreeItem(new Hyperlink("Tutorial",placeManager.buildHistoryToken(rootPlace.with(section_key, "tutorial")))); tutorial_item.setUserObject("tutorial"); tutorial_item.addItem(new Hyperlink("1.) Uploading Phenotypes",placeManager.buildHistoryToken(rootPlace.with(section_key, "tutorial").with(subsection_key, "uploading")))).setUserObject("tutorial_uploading"); tutorial_item.addItem(new Hyperlink("2.) Creating subset",placeManager.buildHistoryToken(rootPlace.with(section_key, "tutorial").with(subsection_key, "subset")))).setUserObject("tutorial_subset"); tutorial_item.addItem(new Hyperlink("3.) Changing transformation",placeManager.buildHistoryToken(rootPlace.with(section_key, "tutorial").with(subsection_key, "transformation")))).setUserObject("tutorial_transformation"); tutorial_item.addItem(new Hyperlink("4.) Running GWAS",placeManager.buildHistoryToken(rootPlace.with(section_key, "tutorial").with(subsection_key, "gwas")))).setUserObject("tutorial_gwas"); tutorial_item.addItem(new Hyperlink("5.) Viewing Results",placeManager.buildHistoryToken(rootPlace.with(section_key, "tutorial").with(subsection_key, "results")))).setUserObject("tutorial_results"); tutorial_item.addItem(new Hyperlink("6.) Running Step-Wise GWAS",placeManager.buildHistoryToken(rootPlace.with(section_key, "tutorial").with(subsection_key, "gwas_step")))).setUserObject("tutorial_gwas_step"); tree.addItem(tutorial_item);*/ Iterator<TreeItem> iterator = tree.treeItemIterator(); while (iterator.hasNext()) { iterator.next().setState(true, false); } }