click-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sa...@apache.org
Subject svn commit: r990765 - /click/trunk/click/extras/src/org/apache/click/extras/control/Menu.java
Date Mon, 30 Aug 2010 10:59:45 GMT
Author: sabob
Date: Mon Aug 30 10:59:44 2010
New Revision: 990765

URL: http://svn.apache.org/viewvc?rev=990765&view=rev
Log:
check for menu.xml under WEB-INF and classpath

Modified:
    click/trunk/click/extras/src/org/apache/click/extras/control/Menu.java

Modified: click/trunk/click/extras/src/org/apache/click/extras/control/Menu.java
URL: http://svn.apache.org/viewvc/click/trunk/click/extras/src/org/apache/click/extras/control/Menu.java?rev=990765&r1=990764&r2=990765&view=diff
==============================================================================
--- click/trunk/click/extras/src/org/apache/click/extras/control/Menu.java (original)
+++ click/trunk/click/extras/src/org/apache/click/extras/control/Menu.java Mon Aug 30 10:59:44
2010
@@ -1496,10 +1496,13 @@ public class Menu extends AbstractContro
             servletContext.getResourceAsStream(DEFAULT_CONFIG_FILE);
 
         if (inputStream == null) {
-            String msg =
-                "could not find configuration file:" + DEFAULT_CONFIG_FILE
-                + " or menu.xml on classpath";
-            throw new RuntimeException(msg);
+            inputStream = ClickUtils.getResourceAsStream("/menu.xml", Menu.class);
+            if (inputStream == null) {
+                String msg =
+                    "could not find configuration file:" + DEFAULT_CONFIG_FILE
+                    + " or menu.xml on classpath";
+                throw new RuntimeException(msg);
+            }
         }
 
         Document document = ClickUtils.buildDocument(inputStream);



Mime
View raw message