Thanks Jay,
I'll try your trick and raise the bug in Jira.

PP 

-----Original Message-----
From: Moskos, Jay [mailto:[EMAIL PROTECTED] 
Sent: Friday, 17 February 2006 6:57 AM
Subject: RE: [magnolia-user] can't get nested paragraphs to move

There's a message in the archive by "Jean-Sebastien Bournival" on
1/2/2006 about this that may be helpful. Let me know if you can't find it.

A nifty trick I use is to delete the top level of the nested paragraph, move
my paragraphs around, create a new top level of the same type of nested
paragraph that used to be on the page (your old nested paragraphs reappear),
and then move the top level nested paragraph where you want it. I'd backup
your page the first time you try this.

I believe that this is a bug within magnolia but I don't have the technical
depth you guys do. If you think it's a bug report it to the jira please.

Cheers,
Jay Moskos

-----Original Message-----
From: [email protected] [mailto:[EMAIL PROTECTED]
Sent: Thursday, February 16, 2006 1:50 PM
To: [email protected]
Subject: [magnolia-user] can't get nested paragraphs to move

Hi,
I'm using 2.1.3 and have created this nested paragraph jsp:
 
 
<%@ taglib uri="cms-taglib" prefix="cms" %> <%@ taglib uri="cms-util-taglib"
prefix="cmsu" %> <%@ taglib uri="http://java.sun.com/jsp/jstl/core";
prefix="c" %>
 
<%@ page import="java.util.Iterator,
info.magnolia.cms.util.Resource,
info.magnolia.cms.core.Content,
info.magnolia.cms.gui.inline.BarEdit,
info.magnolia.cms.gui.inline.BarNew,
info.magnolia.cms.beans.config.Server,
info.magnolia.cms.beans.config.Paragraph,
javax.jcr.PathNotFoundException"
%>
 
<%
 // prepare page title
 String title =
Resource.getActivePage(request).getNodeData("title").getString();
 if(title == null){
  title =
Resource.getActivePage(request).getNodeData("contentTitle").getString();
 }
 title = title.toUpperCase();
 
 // make it accessable for jstl
 pageContext.setAttribute("title", title); %>
 
<!-- content title -->
<!--h1>${title}</h1-->
 
<%
String collectionOuter="Outer";
 
try {
 Iterator it0 = null;
 try {
 
it0=Resource.getActivePage(request).getContent(collectionOuter).getChild
ren(
).iterator();
 }
  catch (PathNotFoundException pnf) {};
 
 if (it0 != null){
  while (it0.hasNext()) {
   Content tab =(Content) it0.next();
 
   if (Server.isAdmin()) {
    BarEdit barOuter=new BarEdit(request);
    barOuter.setSmall(false);
    barOuter.setNodeCollectionName(collectionOuter);
    barOuter.setNodeName(tab.getName());
    barOuter.setParagraph(tab.getNodeData("paragraph").getString());
    barOuter.setPath(Resource.getActivePage(request).getHandle());
    barOuter.setDefaultButtons();
    barOuter.placeDefaultButtons();
    barOuter.getButtonEdit().setLabel("Edit group");
    barOuter.getButtonMove().setLabel("Move group");
    barOuter.getButtonDelete().setLabel("Delete group");
    barOuter.drawHtml(out);
 
//out.println("<b>"+collectionOuter+"::"+tab.getName()+"</b><br><br>");
    }
 
   Resource.setLocalContentNode(request, tab);
   String paragraphName = tab.getNodeData("paragraph").getString();
            Paragraph paragraph = Paragraph.getInfo(paragraphName);
   String jspPage = paragraph.getTemplatePath();
   if (jspPage != null) {
    pageContext.include(jspPage);
   }
 

   //sub paragraphs
   String collectionInner="Inner"+tab.getName();
   try {
    Iterator it1 = null;
    try {
     it1=tab.getContent(collectionInner).getChildren().iterator();
    }
    catch (PathNotFoundException pnf) {};
 
    if (it1 != null){
     while (it1.hasNext()) {
      Content par=(Content) it1.next();
 
      if (Server.isAdmin()) {
       BarEdit barInner=new BarEdit(request);
       barInner.setNodeCollectionName(collectionInner);
       barInner.setNodeName(par.getName());
       barInner.setParagraph(par.getNodeData("paragraph").getString());
       barInner.setPath(tab.getHandle());
       barInner.setDefaultButtons();
       barInner.placeDefaultButtons();
       barInner.drawHtml(out);
       //out.println(collectionInner+"::"+par.getName()+"<br><br>");
      }
 
      Resource.setLocalContentNode(request, par);
      paragraphName = par.getNodeData("paragraph").getString();
      paragraph = Paragraph.getInfo(paragraphName);
      jspPage = paragraph.getTemplatePath();
      if (jspPage != null) {
       pageContext.include(jspPage);
      }
     }
    }
   }
   catch (Exception e) {throw new Exception(e.toString());}
   if (Server.isAdmin()) {
    BarNew newbarInner=new BarNew(request);
    newbarInner.setNodeCollectionName(collectionInner);
    newbarInner.setNodeName("mgnlNew");
    newbarInner.setParagraph("samplesTextImage");
    newbarInner.setPath(tab.getHandle());
    newbarInner.setDefaultButtons();
    newbarInner.placeDefaultButtons();
    newbarInner.drawHtml(out);
    }
 
   //out.println("<br><br>");
  }
 }
 
}
catch (Exception e) {throw new Exception(e.toString());}
 
if (Server.isAdmin()) {
 BarNew newbarOuter=new BarNew(request);  newbarOuter.setSmall(false);
newbarOuter.setNodeCollectionName(collectionOuter);
 newbarOuter.setNodeName("mgnlNew");
 newbarOuter.setParagraph("columnGroup");
 newbarOuter.setPath(Resource.getActivePage(request).getHandle());
 newbarOuter.setDefaultButtons();
 newbarOuter.getButtonNew().setLabel("New Group");
newbarOuter.placeDefaultButtons();
 newbarOuter.drawHtml(out);
}
%>
 
<!-- spacer -->
<div style="clear:both;">
 <c:if test="${spacer=='1'}">
  <br/>
 </c:if>
 <c:if test="${spacer=='2'}">
  <br/><br/>
 </c:if>
</div>

which all works very well, except for when I want to move either the group
paragraph or the inner paragraphs within the group paragraph - nothing
happens.
 
it all seems to work properly within the browser (IE 6.029) in that I can
click on the move button and I'm told when I can click on another bar that
it will  move it to preceed that parapgraph (all as per normal).
 
However, when I do this nothing happens - nothing gets moved, no error
messages, nothing - the action is just ignored.
 
Is there anything I need to add to my JSP to make this work, given that I'm
not uins the usual contentNodeIterator tag?
 
appeciate any help.
 
Paul


----------------------------------------------------------------
for list details see
http://www.magnolia.info/en/magnolia/developer.html
----------------------------------------------------------------


----------------------------------------------------------------
for list details see
http://www.magnolia.info/en/magnolia/developer.html
----------------------------------------------------------------

Reply via email to