You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lenya.apache.org by ro...@apache.org on 2004/10/28 21:32:15 UTC

svn commit: rev 55886 - in incubator/lenya/branches/BRANCH_1_2_X/src: java/org/apache/lenya/cms/cocoon/components/modules/input webapp/lenya/content/info

Author: roku
Date: Thu Oct 28 12:32:13 2004
New Revision: 55886

Modified:
   incubator/lenya/branches/BRANCH_1_2_X/src/java/org/apache/lenya/cms/cocoon/components/modules/input/SitetreeModule.java
   incubator/lenya/branches/BRANCH_1_2_X/src/webapp/lenya/content/info/overview.xsp
Log:
Fix for bug #31941

Modified: incubator/lenya/branches/BRANCH_1_2_X/src/java/org/apache/lenya/cms/cocoon/components/modules/input/SitetreeModule.java
==============================================================================
--- incubator/lenya/branches/BRANCH_1_2_X/src/java/org/apache/lenya/cms/cocoon/components/modules/input/SitetreeModule.java	(original)
+++ incubator/lenya/branches/BRANCH_1_2_X/src/java/org/apache/lenya/cms/cocoon/components/modules/input/SitetreeModule.java	Thu Oct 28 12:32:13 2004
@@ -36,9 +36,10 @@
 
     public static final String AUTHORING_NODE = "authoring-node";
     public static final String LIVE_NODE = "live-node";
+    public static final String TRASH_NODE = "trash-node";
     public static final String FIRST_CHILD_ID = "first-child-id";
 
-    protected static final String[] PARAMETER_NAMES = { AUTHORING_NODE, LIVE_NODE, FIRST_CHILD_ID };
+    protected static final String[] PARAMETER_NAMES = { AUTHORING_NODE, LIVE_NODE, TRASH_NODE, FIRST_CHILD_ID };
 
     /**
      * @see org.apache.cocoon.components.modules.input.InputModule#getAttribute(java.lang.String, org.apache.avalon.framework.configuration.Configuration, java.util.Map)
@@ -62,6 +63,11 @@
                 value = liveTree.getNode(envelope.getDocument().getId());
             }
 
+            if (name.equals(TRASH_NODE)) {
+                SiteTree authoringTree = publication.getSiteTree(Publication.TRASH_AREA);
+                value = authoringTree.getNode(envelope.getDocument().getId());
+            }
+            
             if (name.equals(FIRST_CHILD_ID)) {
                 SiteTree siteTree = publication.getSiteTree(envelope.getDocument().getArea());
                 SiteTreeNode node = siteTree.getNode(envelope.getDocument().getId()); 

Modified: incubator/lenya/branches/BRANCH_1_2_X/src/webapp/lenya/content/info/overview.xsp
==============================================================================
--- incubator/lenya/branches/BRANCH_1_2_X/src/webapp/lenya/content/info/overview.xsp	(original)
+++ incubator/lenya/branches/BRANCH_1_2_X/src/webapp/lenya/content/info/overview.xsp	Thu Oct 28 12:32:13 2004
@@ -45,11 +45,16 @@
     <xsp:logic>
       Document doc = (Document)<input:get-attribute module="page-envelope" as="object" name="document"/>;
 
-      SiteTreeNode node = (SiteTreeNode) <input:get-attribute module="sitetree" as="object" name="authoring-node"/>;
+      final Object nodeObject = <input:get-attribute module="sitetree" as="object" name="authoring-node"/>;
+      SiteTreeNode node = null;
       String visibility = "visible";
+      if(nodeObject instanceof SiteTreeNode) { 
+          node = (SiteTreeNode) <input:get-attribute module="sitetree" as="object" name="authoring-node"/>;
+      }
+      else
+          node = (SiteTreeNode) <input:get-attribute module="sitetree" as="object" name="trash-node"/>;
       if (!node.visibleInNav()) visibility = "hidden";
 
-      
       boolean exists = false;
       boolean existsLanguage = false;
       try {
@@ -93,8 +98,7 @@
 						<lenya-info:area></lenya-info:area>
 						<lenya-info:workflow-state><input:get-attribute module="workflow" as="string" name="state"/></lenya-info:workflow-state>
 						<lenya-info:is-live><input:get-attribute module="workflow" as="string" name="variable.is_live"/></lenya-info:is-live>
-                        <lenya-info:visibleinnav><xsp:expr>visibility</xsp:expr></lenya-info:visibleinnav>
-      
+                                                <lenya-info:visibleinnav><xsp:expr>visibility</xsp:expr></lenya-info:visibleinnav>
       }
       
     </xsp:logic>
@@ -102,4 +106,4 @@
 		</lenya-info:overview>  
   </lenya-info:info>
   
-</xsp:page>
\ No newline at end of file
+</xsp:page>

---------------------------------------------------------------------
To unsubscribe, e-mail: lenya-cvs-unsubscribe@cocoon.apache.org
For additional commands, e-mail: lenya-cvs-help@cocoon.apache.org