Skip to content

Commit

Permalink
Switch to use DOM builder for error message (#121)
Browse files Browse the repository at this point in the history
  • Loading branch information
labkey-jeckels authored Dec 8, 2023
1 parent f7caa78 commit aefa956
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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("<p class='labkey-error'>Could not find a workbook with id '" + form.getId() + "' in this folder or subfolders. Try searching or entering a different id.</p>");
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);
Expand Down

0 comments on commit aefa956

Please sign in to comment.