From c8452f038d9463848b66584e57b1f9cd9f13bfe6 Mon Sep 17 00:00:00 2001 From: labkey-jeckels Date: Thu, 7 Dec 2023 09:50:45 -0800 Subject: [PATCH] Switch to use DOM builder for error message --- .../oconnorexperiments/OConnorExperimentsController.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/OConnorExperiments/src/org/labkey/oconnorexperiments/OConnorExperimentsController.java b/OConnorExperiments/src/org/labkey/oconnorexperiments/OConnorExperimentsController.java index 48a4d615..417de1a7 100644 --- a/OConnorExperiments/src/org/labkey/oconnorexperiments/OConnorExperimentsController.java +++ b/OConnorExperiments/src/org/labkey/oconnorexperiments/OConnorExperimentsController.java @@ -54,6 +54,7 @@ import org.labkey.api.security.permissions.ReadPermission; import org.labkey.api.security.permissions.UpdatePermission; import org.labkey.api.services.ServiceRegistry; +import org.labkey.api.util.DOM; import org.labkey.api.util.FileStream; import org.labkey.api.util.PageFlowUtil; import org.labkey.api.util.Path; @@ -552,7 +553,7 @@ public ModelAndView getView(LookupWorkbookForm form, BindException errors) throw new RedirectException(container.getStartURL(getUser())); //otherwise, return a workbooks list with the search view - HtmlView message = new HtmlView("

Could not find a workbook with id '" + form.getId() + "' in this folder or subfolders. Try searching or entering a different id.

"); + HtmlView message = new HtmlView(DOM.P(DOM.cl( "labkey-error"), "Could not find a workbook with id '" + form.getId() + "' in this folder or subfolders. Try searching or entering a different id.")); UserSchema schema = QueryService.get().getUserSchema(getUser(), getContainer(), OConnorExperimentsSchema.NAME); org.labkey.oconnorexperiments.WorkbookQueryView wbqview = new WorkbookQueryView(getViewContext(), schema); return new VBox(message, new JspView<>("/org/labkey/oconnorexperiments/view/workbookSearch.jsp", new WorkbookSearchBean(wbqview, null)), wbqview);