1. opensymphony
  2. webwork

Commits

jcarreira  committed 409ef82

config browser fixes

git-svn-id: http://svn.opensymphony.com/svn/webwork/trunk@284573baa09-0c28-0410-bef9-dab3c582ae83

  • Participants
  • Parent commits 8b655c7
  • Branches master

Comments (0)

Files changed (2)

File src/config-browser/com/opensymphony/webwork/config_browser/ActionNamesAction.java

View file
  */
 public class ActionNamesAction extends ActionSupport {
     private Set actionNames;
-    private String namespace;
+    private String namespace = "";
     private Set namespaces;
     private static Log log = LogFactory.getLog(ActionNamesAction.class);
 
         return namespaces;
     }
 
-    /**
-     * Extremely quick hack 
-     */
-/*	public boolean resultContains(String actionName, String location) {
-		if (location == null) return false;
-		try {
-			InputStream in = ServletActionContext.getServletContext().getResourceAsStream(location);
-			StringBuffer content = new StringBuffer();
-			byte[] buf = new byte[1024];
-			int read;
-			while ((read = in.read(buf)) > 0) {
-				content.append(new String(buf, 0, read));
-			}
-			return (content.toString().indexOf(actionName) > 0);
-		} catch (Exception e) {
-			log.error("Unable to get resouce " + location, e);
-			return false;
-		}
-	}*/
     public String execute() throws Exception {
         namespaces = ConfigurationHelper.getNamespaces();
         if (namespaces.size() == 0) {
             return ERROR;
         }
         if (namespace == null) {
-            namespace = (String) namespaces.iterator().next();
+            namespace = "";
         }
         actionNames =
                 new TreeSet(ConfigurationHelper.getActionNames(namespace));

File src/config-browser/showConfig.vm

View file
 <table>
 	<tr><td width="100%">
 #bodytag (Form)
-	#tag (Label "label='Action name'" "name=actionName")
-	#tag (Label "label='Namespace'" "name=namespace")
-	#tag (Label "label='Action class'" "name=config.class")
-	#tag (Label "label='Action method'" "name=config.method.name")
+	#tag (Label "label='Action name'" "name='actionName'")
+	#tag (Label "label='Namespace'" "name='namespace'")
+	#tag (Label "label='Action class'" "name='config.class'")
+	#tag (Label "label='Action method'" "name='config.method.name'")
 	#tag (Label "label='Parameters'" "name='$params'")
 	#tag (Label "label='Location'" "name='<a href=\"${req.contextPath}${namespace}/${actionName}.action\">${req.contextPath}${namespace}/${actionName}.action</a>'")
 #end