Just to be sure i got it right: You added a page to the AdminCentral
where you would like to use the cms:editButton tag and it doesn't work.
Is that correct?
You guessed correctly that the tags are meant for the web pages not for
the adminCentral use. However you should be able to provide the tag with
all the info and make it work even there. Without seeing the whole
stacktrace, it is difficult to guess what went wrong, but my guess would
be it is missing content. On a page this is obtained via aggregation
state, but you can set the content directly for the tag using the
"contentNodeName" parameter. [1]

[1]
http://dev.magnolia-cms.com/ref/4.1/magnolia-taglib-cms/tlddoc/cms/editBar.html

HTH,
Jan

On Fri, 2009-09-11 at 15:32 -0500, Rakesh Vidyadharan wrote:
> 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]>
> ----------------------------------------------------------------


----------------------------------------------------------------
For list details see
http://www.magnolia-cms.com/home/community/mailing-lists.html
To unsubscribe, E-mail to: <[email protected]>
----------------------------------------------------------------

Reply via email to