[Yanel-commits] rev 60218 - public/yanel/trunk/src/resources/navigation/src/java/org/wyona/yanel/impl/resources/navigation
michi at wyona.com
michi at wyona.com
Wed Aug 24 16:59:34 CEST 2011
Author: michi
Date: 2011-08-24 16:59:33 +0200 (Wed, 24 Aug 2011)
New Revision: 60218
Modified:
public/yanel/trunk/src/resources/navigation/src/java/org/wyona/yanel/impl/resources/navigation/NavigationResource.java
Log:
javadoc improved
Modified: public/yanel/trunk/src/resources/navigation/src/java/org/wyona/yanel/impl/resources/navigation/NavigationResource.java
===================================================================
--- public/yanel/trunk/src/resources/navigation/src/java/org/wyona/yanel/impl/resources/navigation/NavigationResource.java 2011-08-24 14:59:14 UTC (rev 60217)
+++ public/yanel/trunk/src/resources/navigation/src/java/org/wyona/yanel/impl/resources/navigation/NavigationResource.java 2011-08-24 14:59:33 UTC (rev 60218)
@@ -60,16 +60,14 @@
/**
* The NavigationResource may be used to generate menu, breadcrumb, or
- * other navigation elements of a page.
- * Typically it is xincluded into a normal page.
+ * other navigation elements of a page. Typically it is xincluded into a normal page.
*
* Parameters:
- * path: Current path which is part of the browser url. Links will
- * be resolved relative to this path.
- * active-path: Path of the active node (e.g. the node which will be
- * highlighted in the menu)
- * If this parameter is omitted, the path parameter will be used.
- * language: language
+ * path: Current path which is part of the browser url. Links will
+ * be resolved relative to this path.
+ * active-path: Path of the active node (e.g. the node which will be
+ * highlighted in the menu). If this parameter is omitted, then path parameter will be used.
+ * language: Language of navigation
*/
public class NavigationResource extends Resource implements ViewableV2, ModifiableV2 {
@@ -109,11 +107,17 @@
String currentPath = null;
String activePath = null;
if (getParameters() != null) {
- currentPath = (String)getParameters().get("path");
- activePath = (String)getParameters().get("active-path");
+ currentPath = (String)getParameters().get("path"); // INFO: See description above inside Javadoc
+ activePath = (String)getParameters().get("active-path"); // INFO: See description inside Javadoc
}
- if (currentPath == null) currentPath = getPath();
- if (activePath == null) activePath = currentPath;
+ if (currentPath == null) {
+ currentPath = getPath();
+ log.warn("No current path set, hence use request path: " + currentPath);
+ }
+ if (activePath == null) {
+ log.warn("No active path set explicitely, hence use current path: " + currentPath);
+ activePath = currentPath;
+ }
String language = getLanguage();
//log.debug("Language: " + language);
More information about the Yanel-commits
mailing list