[Yanel-commits] rev 47523 - public/yanel/trunk/src/contributions/resources/resource-creator/src/java/org/wyona/yanel/impl/resources/rescreator

michi at wyona.com michi at wyona.com
Wed Feb 10 19:47:28 CET 2010


Author: michi
Date: 2010-02-10 19:47:28 +0100 (Wed, 10 Feb 2010)
New Revision: 47523

Modified:
   public/yanel/trunk/src/contributions/resources/resource-creator/src/java/org/wyona/yanel/impl/resources/rescreator/ResourceCreatorResource.java
Log:
initial lookin path implemented

Modified: public/yanel/trunk/src/contributions/resources/resource-creator/src/java/org/wyona/yanel/impl/resources/rescreator/ResourceCreatorResource.java
===================================================================
--- public/yanel/trunk/src/contributions/resources/resource-creator/src/java/org/wyona/yanel/impl/resources/rescreator/ResourceCreatorResource.java	2010-02-10 18:46:55 UTC (rev 47522)
+++ public/yanel/trunk/src/contributions/resources/resource-creator/src/java/org/wyona/yanel/impl/resources/rescreator/ResourceCreatorResource.java	2010-02-10 18:47:28 UTC (rev 47523)
@@ -676,7 +676,17 @@
         if (lookinPath != null) {
             node = sitetree.getNode(getRealm(), lookinPath);
         } else {
-            node = sitetree.getNode(getRealm(), getPath());
+            try {
+                if(getResourceConfigProperty("lookin") != null) {
+                    node = sitetree.getNode(getRealm(), getResourceConfigProperty("lookin"));
+                } else {
+                    node = sitetree.getNode(getRealm(), getPath());
+                    log.warn("No initial lookin path specified, hence use creator page path itself: " + getPath());
+                }
+            } catch (Exception e) {
+                log.error(e, e);
+                node = sitetree.getNode(getRealm(), getPath());
+            }
         }
 
         if (node != null) {
@@ -805,6 +815,9 @@
         return parentOfNewResource;
     }
 
+    /**
+     *
+     */
     private String getReferer() {
         if(request.getParameter("referer") != null) {
             return request.getParameter("referer");



More information about the Yanel-commits mailing list