diff --git a/api/src/org/labkey/api/study/actions/UploadWizardAction.java b/api/src/org/labkey/api/study/actions/UploadWizardAction.java index 1ded2eae283..392e2cdce62 100644 --- a/api/src/org/labkey/api/study/actions/UploadWizardAction.java +++ b/api/src/org/labkey/api/study/actions/UploadWizardAction.java @@ -756,18 +756,23 @@ protected void addSampleInputColumns(FormType form, InsertView insertView) // Don't add any inputs in the base case } + @Nullable public NavTree appendNavTrail(NavTree root) { - ActionURL helper = PageFlowUtil.urlProvider(AssayUrls.class).getAssayRunsURL(getContainer(), _protocol); - NavTree result = root.addChild("Assay List", PageFlowUtil.urlProvider(AssayUrls.class).getAssayListURL(getContainer())); - result.addChild(_protocol.getName(), PageFlowUtil.urlProvider(AssayUrls.class).getAssayRunsURL(getContainer(), _protocol)); - String finalChild = "Data Import"; - if (_stepDescription != null) + if (null != _protocol) { - finalChild = finalChild + ": " + _stepDescription; + ActionURL helper = PageFlowUtil.urlProvider(AssayUrls.class).getAssayRunsURL(getContainer(), _protocol); + NavTree result = root.addChild("Assay List", PageFlowUtil.urlProvider(AssayUrls.class).getAssayListURL(getContainer())); + result.addChild(_protocol.getName(), PageFlowUtil.urlProvider(AssayUrls.class).getAssayRunsURL(getContainer(), _protocol)); + String finalChild = "Data Import"; + if (_stepDescription != null) + { + finalChild = finalChild + ": " + _stepDescription; + } + result.addChild(finalChild, helper); + return result; } - result.addChild(finalChild, helper); - return result; + return null; } protected DataRegion createDataRegionForInsert(TableInfo baseTable, String lsidCol, List domainProperties, Map columnNameToPropertyName) diff --git a/issues/src/org/labkey/issue/IssuesController.java b/issues/src/org/labkey/issue/IssuesController.java index 23d9a0d6626..01e652edcc8 100644 --- a/issues/src/org/labkey/issue/IssuesController.java +++ b/issues/src/org/labkey/issue/IssuesController.java @@ -450,8 +450,10 @@ public ModelAndView getView(IssuesController.IssuesForm form, boolean reshow, Bi public NavTree appendNavTrail(NavTree root) { - return new ListAction(getViewContext()).appendNavTrail(root). - addChild(getSingularEntityName() + " " + _issue.getIssueId() + ": " + StringUtils.trimToEmpty(_issue.getTitle()), getURL()); + NavTree nav = new ListAction(getViewContext()).appendNavTrail(root); + if (null != _issue) + nav.addChild(getSingularEntityName() + " " + _issue.getIssueId() + ": " + StringUtils.trimToEmpty(_issue.getTitle()), getURL()); + return nav; } public ActionURL getURL() diff --git a/study/src/org/labkey/study/controllers/InsertUpdateAction.java b/study/src/org/labkey/study/controllers/InsertUpdateAction.java index 980c2bf1a85..cf4bdcf4770 100644 --- a/study/src/org/labkey/study/controllers/InsertUpdateAction.java +++ b/study/src/org/labkey/study/controllers/InsertUpdateAction.java @@ -234,11 +234,14 @@ public NavTree appendNavTrail(NavTree root) rootURL = new ActionURL(StudyController.BeginAction.class, container); } root.addChild(study.getLabel(), rootURL); - ActionURL grid = new ActionURL(StudyController.DatasetAction.class, getContainer()); - grid.addParameter(DatasetDefinition.DATASETKEY, _ds.getDatasetId()); - grid.addParameter(DataRegion.LAST_FILTER_PARAM, "true"); - root.addChild(_ds.getLabel(), grid); - appendExtraNavTrail(root); + if (null != _ds) + { + ActionURL grid = new ActionURL(StudyController.DatasetAction.class, getContainer()); + grid.addParameter(DatasetDefinition.DATASETKEY, _ds.getDatasetId()); + grid.addParameter(DataRegion.LAST_FILTER_PARAM, "true"); + root.addChild(_ds.getLabel(), grid); + appendExtraNavTrail(root); + } return root; }