Platform is Magnolia CE 4.1 bundled edition. How can I display dialog from a page (TemplateMVCHandler)? In my module, one menu item displays a search form for searching for authors. The search lists all matching authors, which are in turn hyperlinked to their detail page which displays information about the selected author. I have got that far without issues. Now, I need to display an edit link (similar to the ones on pages in the cms), that will display a configured dialog. My page HTML is as follows:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> [#assign cms=JspTaglibs["cms-taglib"]] <html> <head> <title>UCP Books</title> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <link href="${this.request.contextPath}/.resources/admin-css/admin-all.css" type="text/css" rel="stylesheet" /> </head> <body id="mgnl" class="mgnlBgLight mgnlImportExport"> <h2>${this.messages.get("module.books.pages.AuthorDetailPage.header")}</h2> [[email protected] label="Edit Meta Data" dialog="author" /] <div class="pageFrame">${this.content}</div> </body> </html> The problem is that the editButton throws an NPE: java.lang.NullPointerException at info.magnolia.cms.taglibs.EditButton.doEndTag(EditButton.java:84) at freemarker.ext.jsp.TagTransformModel$TagWriter.endEvaluation(TagTransformModel.java:431) at I suppose I should not be too surprised by the NPE, since the tag probably has not idea which node is being edited in the first place. That brings me back to my original question, which is the way to display a link/button to display the edit dialog for the node driving the current page. Alternatively, is there any way to display the search results as a tree, and then associate the dialog off the tree as usual? I have that process all working for other sections of my module, but the authors (and books) do not lend themselves well to a tree view due to the number of items. Thanks in advance for all advice and suggestions. Rakesh ---------------------------------------------------------------- For list details see http://www.magnolia-cms.com/home/community/mailing-lists.html To unsubscribe, E-mail to: <[email protected]> ----------------------------------------------------------------
