struts-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lukaszlen...@apache.org
Subject svn commit: r1302806 - in /struts/struts2/trunk/plugins/config-browser/src/main: java/org/apache/struts2/config_browser/ resources/config-browser/
Date Tue, 20 Mar 2012 10:12:24 GMT
Author: lukaszlenart
Date: Tue Mar 20 09:17:02 2012
New Revision: 1302806

URL: http://svn.apache.org/viewvc?rev=1302806&view=rev
Log:
Improves config-browser plugin, cleanups code, adds support for Convention plugin

Modified:
    struts/struts2/trunk/plugins/config-browser/src/main/java/org/apache/struts2/config_browser/ActionNamesAction.java
    struts/struts2/trunk/plugins/config-browser/src/main/java/org/apache/struts2/config_browser/ListValidatorsAction.java
    struts/struts2/trunk/plugins/config-browser/src/main/java/org/apache/struts2/config_browser/ShowBeansAction.java
    struts/struts2/trunk/plugins/config-browser/src/main/java/org/apache/struts2/config_browser/ShowConfigAction.java
    struts/struts2/trunk/plugins/config-browser/src/main/java/org/apache/struts2/config_browser/ShowConstantsAction.java
    struts/struts2/trunk/plugins/config-browser/src/main/java/org/apache/struts2/config_browser/ShowJarsAction.java
    struts/struts2/trunk/plugins/config-browser/src/main/java/org/apache/struts2/config_browser/ShowValidatorAction.java
    struts/struts2/trunk/plugins/config-browser/src/main/resources/config-browser/actionNames.ftl
    struts/struts2/trunk/plugins/config-browser/src/main/resources/config-browser/page-header.ftl
    struts/struts2/trunk/plugins/config-browser/src/main/resources/config-browser/showConfig.ftl
    struts/struts2/trunk/plugins/config-browser/src/main/resources/config-browser/showValidators.ftl
    struts/struts2/trunk/plugins/config-browser/src/main/resources/config-browser/tigris-macros.ftl
    struts/struts2/trunk/plugins/config-browser/src/main/resources/config-browser/validatorDetails.ftl

Modified: struts/struts2/trunk/plugins/config-browser/src/main/java/org/apache/struts2/config_browser/ActionNamesAction.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/plugins/config-browser/src/main/java/org/apache/struts2/config_browser/ActionNamesAction.java?rev=1302806&r1=1302805&r2=1302806&view=diff
==============================================================================
--- struts/struts2/trunk/plugins/config-browser/src/main/java/org/apache/struts2/config_browser/ActionNamesAction.java
(original)
+++ struts/struts2/trunk/plugins/config-browser/src/main/java/org/apache/struts2/config_browser/ActionNamesAction.java
Tue Mar 20 09:17:02 2012
@@ -31,25 +31,24 @@ import java.util.TreeSet;
 
 /**
  * ActionNamesAction
- *
  */
 public class ActionNamesAction extends ActionSupport {
 
     private static final long serialVersionUID = -5389385242431387840L;
 
-    private Set actionNames;
+    private Set<String> actionNames;
     private String namespace = "";
-    private Set namespaces;
+    private Set<String> namespaces;
     private String extension;
-    
+
     protected ConfigurationHelper configHelper;
 
     @Inject
     public void setConfigurationHelper(ConfigurationHelper cfg) {
         this.configHelper = cfg;
     }
-    
-    public Set getActionNames() {
+
+    public Set<String> getActionNames() {
         return actionNames;
     }
 
@@ -60,7 +59,7 @@ public class ActionNamesAction extends A
     public void setNamespace(String namespace) {
         this.namespace = namespace;
     }
-    
+
     @Inject(StrutsConstants.STRUTS_ACTION_EXTENSION)
     public void setExtension(String ext) {
         this.extension = ext;
@@ -70,15 +69,15 @@ public class ActionNamesAction extends A
         return configHelper.getActionConfig(namespace, actionName);
     }
 
-    public Set getNamespaces() {
+    public Set<String> getNamespaces() {
         return namespaces;
     }
 
     public String getExtension() {
-        if ( extension == null) {
+        if (extension == null) {
             return "action";
         }
-        if (extension.indexOf(",") > -1) {
+        if (extension.contains(",")) {
             return extension.substring(0, extension.indexOf(","));
         }
         return extension;
@@ -93,8 +92,7 @@ public class ActionNamesAction extends A
         if (namespace == null) {
             namespace = "";
         }
-        actionNames =
-                new TreeSet(configHelper.getActionNames(namespace));
+        actionNames = new TreeSet<String>(configHelper.getActionNames(namespace));
         return SUCCESS;
     }
 }

Modified: struts/struts2/trunk/plugins/config-browser/src/main/java/org/apache/struts2/config_browser/ListValidatorsAction.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/plugins/config-browser/src/main/java/org/apache/struts2/config_browser/ListValidatorsAction.java?rev=1302806&r1=1302805&r2=1302806&view=diff
==============================================================================
--- struts/struts2/trunk/plugins/config-browser/src/main/java/org/apache/struts2/config_browser/ListValidatorsAction.java
(original)
+++ struts/struts2/trunk/plugins/config-browser/src/main/java/org/apache/struts2/config_browser/ListValidatorsAction.java
Tue Mar 20 09:17:02 2012
@@ -41,7 +41,7 @@ public class ListValidatorsAction extend
 
     private String clazz;
     private String context;
-    List<Validator> validators = Collections.EMPTY_LIST;
+    List<Validator> validators = Collections.emptyList();
     private ActionValidatorManager actionValidatorManager;
 
     

Modified: struts/struts2/trunk/plugins/config-browser/src/main/java/org/apache/struts2/config_browser/ShowBeansAction.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/plugins/config-browser/src/main/java/org/apache/struts2/config_browser/ShowBeansAction.java?rev=1302806&r1=1302805&r2=1302806&view=diff
==============================================================================
--- struts/struts2/trunk/plugins/config-browser/src/main/java/org/apache/struts2/config_browser/ShowBeansAction.java
(original)
+++ struts/struts2/trunk/plugins/config-browser/src/main/java/org/apache/struts2/config_browser/ShowBeansAction.java
Tue Mar 20 09:17:02 2012
@@ -21,18 +21,6 @@
 
 package org.apache.struts2.config_browser;
 
-import java.util.Map;
-import java.util.Set;
-import java.util.TreeMap;
-import java.util.TreeSet;
-
-import org.apache.struts2.StrutsConstants;
-import org.apache.struts2.components.UrlRenderer;
-import org.apache.struts2.dispatcher.mapper.ActionMapper;
-import org.apache.struts2.dispatcher.multipart.MultiPartRequest;
-import org.apache.struts2.views.freemarker.FreemarkerManager;
-import org.apache.struts2.views.velocity.VelocityManager;
-
 import com.opensymphony.xwork2.ActionProxyFactory;
 import com.opensymphony.xwork2.ObjectFactory;
 import com.opensymphony.xwork2.TextProvider;
@@ -40,6 +28,18 @@ import com.opensymphony.xwork2.conversio
 import com.opensymphony.xwork2.conversion.impl.XWorkConverter;
 import com.opensymphony.xwork2.inject.Container;
 import com.opensymphony.xwork2.inject.Inject;
+import org.apache.struts2.StrutsConstants;
+import org.apache.struts2.components.UrlRenderer;
+import org.apache.struts2.dispatcher.mapper.ActionMapper;
+import org.apache.struts2.dispatcher.multipart.MultiPartRequest;
+import org.apache.struts2.views.freemarker.FreemarkerManager;
+import org.apache.struts2.views.velocity.VelocityManager;
+
+import java.util.Collections;
+import java.util.Map;
+import java.util.Set;
+import java.util.TreeMap;
+import java.util.TreeSet;
 
 /**
  * Shows the beans loaded by the internal Guice container.  Only shows beans that are recognized
by Struts as official
@@ -47,11 +47,11 @@ import com.opensymphony.xwork2.inject.In
  */
 public class ShowBeansAction extends ActionNamesAction {
 
-    Map<String,Set<Binding>> bindings;
+    Map<String, Set<Binding>> bindings;
 
     @Inject
     public void setContainer(Container container) {
-        bindings = new TreeMap<String,Set<Binding>>();
+        bindings = new TreeMap<String, Set<Binding>>();
         bindings.put(ObjectFactory.class.getName(), addBindings(container, ObjectFactory.class,
StrutsConstants.STRUTS_OBJECTFACTORY));
         bindings.put(XWorkConverter.class.getName(), addBindings(container, XWorkConverter.class,
StrutsConstants.STRUTS_XWORKCONVERTER));
         bindings.put(TextProvider.class.getName(), addBindings(container, TextProvider.class,
StrutsConstants.STRUTS_XWORKTEXTPROVIDER));
@@ -63,12 +63,11 @@ public class ShowBeansAction extends Act
         bindings.put(VelocityManager.class.getName(), addBindings(container, VelocityManager.class,
StrutsConstants.STRUTS_VELOCITY_MANAGER_CLASSNAME));
         bindings.put(UrlRenderer.class.getName(), addBindings(container, UrlRenderer.class,
StrutsConstants.STRUTS_URL_RENDERER));
     }
-    
-    public Map<String, Set<Binding>> getBeans()
-    {
+
+    public Map<String, Set<Binding>> getBeans() {
         return bindings;
     }
-    
+
     protected Set<Binding> addBindings(Container container, Class type, String constName)
{
         Set<Binding> bindings = new TreeSet<Binding>();
         String chosenName = container.getInstance(String.class, constName);
@@ -76,6 +75,9 @@ public class ShowBeansAction extends Act
             chosenName = "struts";
         }
         Set<String> names = container.getInstanceNames(type);
+        if (names == null) {
+            names = Collections.emptySet();
+        }
         if (!names.contains(chosenName)) {
             bindings.add(new Binding(getInstanceClassName(container, type, "default"), chosenName,
constName, true));
         }
@@ -97,33 +99,36 @@ public class ShowBeansAction extends Act
         }
         return instName;
     }
-    
+
     public class Binding implements Comparable<Binding> {
         private String impl;
         private String alias;
         private String constant;
         private boolean isDefault;
-        
+
         public Binding(String impl, String alias, String constant, boolean def) {
             this.impl = impl;
             this.alias = alias;
             this.constant = constant;
             this.isDefault = def;
         }
+
         public String getImpl() {
             return impl;
         }
+
         public String getAlias() {
             return alias;
         }
+
         public String getConstant() {
             return constant;
         }
-        
+
         public boolean isDefault() {
             return isDefault;
         }
-        
+
         public int compareTo(Binding b2) {
             int ret = 0;
             if (isDefault) {

Modified: struts/struts2/trunk/plugins/config-browser/src/main/java/org/apache/struts2/config_browser/ShowConfigAction.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/plugins/config-browser/src/main/java/org/apache/struts2/config_browser/ShowConfigAction.java?rev=1302806&r1=1302805&r2=1302806&view=diff
==============================================================================
--- struts/struts2/trunk/plugins/config-browser/src/main/java/org/apache/struts2/config_browser/ShowConfigAction.java
(original)
+++ struts/struts2/trunk/plugins/config-browser/src/main/java/org/apache/struts2/config_browser/ShowConfigAction.java
Tue Mar 20 09:17:02 2012
@@ -39,8 +39,6 @@ public class ShowConfigAction extends Ac
 
     private static final long serialVersionUID = -1630527489407671652L;
 
-    private static final PropertyDescriptor[] PDSAT = new PropertyDescriptor[0];
-
     private String namespace;
     private String actionName;
     private ActionConfig config;
@@ -60,7 +58,7 @@ public class ShowConfigAction extends Ac
         this.detailView = detailView;
     }
 
-    public Set getActionNames() {
+    public Set<String> getActionNames() {
         return actionNames;
     }
 

Modified: struts/struts2/trunk/plugins/config-browser/src/main/java/org/apache/struts2/config_browser/ShowConstantsAction.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/plugins/config-browser/src/main/java/org/apache/struts2/config_browser/ShowConstantsAction.java?rev=1302806&r1=1302805&r2=1302806&view=diff
==============================================================================
--- struts/struts2/trunk/plugins/config-browser/src/main/java/org/apache/struts2/config_browser/ShowConstantsAction.java
(original)
+++ struts/struts2/trunk/plugins/config-browser/src/main/java/org/apache/struts2/config_browser/ShowConstantsAction.java
Tue Mar 20 09:17:02 2012
@@ -21,29 +21,28 @@
 
 package org.apache.struts2.config_browser;
 
-import java.util.HashMap;
-import java.util.Map;
-
 import com.opensymphony.xwork2.inject.Container;
 import com.opensymphony.xwork2.inject.Inject;
 
+import java.util.HashMap;
+import java.util.Map;
+
 /**
  * Shows all constants as loaded by Struts
  */
 public class ShowConstantsAction extends ActionNamesAction {
 
-    Map<String,String> consts;
-    
+    private Map<String, String> constants;
+
     @Inject
     public void setContainer(Container container) {
-        consts = new HashMap<String,String>();
+        constants = new HashMap<String, String>();
         for (String key : container.getInstanceNames(String.class)) {
-            consts.put(key, container.getInstance(String.class, key));
+            constants.put(key, container.getInstance(String.class, key));
         }
     }
-    
-    public Map<String,String> getConstants()
-    {
-        return consts;
+
+    public Map<String, String> getConstants() {
+        return constants;
     }
 }

Modified: struts/struts2/trunk/plugins/config-browser/src/main/java/org/apache/struts2/config_browser/ShowJarsAction.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/plugins/config-browser/src/main/java/org/apache/struts2/config_browser/ShowJarsAction.java?rev=1302806&r1=1302805&r2=1302806&view=diff
==============================================================================
--- struts/struts2/trunk/plugins/config-browser/src/main/java/org/apache/struts2/config_browser/ShowJarsAction.java
(original)
+++ struts/struts2/trunk/plugins/config-browser/src/main/java/org/apache/struts2/config_browser/ShowJarsAction.java
Tue Mar 20 09:17:02 2012
@@ -21,48 +21,34 @@
 
 package org.apache.struts2.config_browser;
 
+import com.opensymphony.xwork2.util.ClassLoaderUtil;
+
 import java.io.IOException;
 import java.net.URL;
 import java.util.Collections;
-import java.util.HashMap;
 import java.util.Iterator;
 import java.util.List;
-import java.util.Map;
 import java.util.Properties;
 
-import com.opensymphony.xwork2.inject.Container;
-import com.opensymphony.xwork2.inject.Inject;
-import com.opensymphony.xwork2.util.ClassLoaderUtil;
-
 /**
  * Shows all constants as loaded by Struts
  */
 public class ShowJarsAction extends ActionNamesAction {
 
-    List<Properties> poms;
-    
-    @Inject
-    public void setContainer(Container container) {
+    public List<Properties> getJarPoms() {
         try {
-            poms = configHelper.getJarProperties();
-        }
-        catch (IOException ioe) {
+            return configHelper.getJarProperties();
+        } catch (IOException ioe) {
             // this is the config browser, so it doesn't seem necessary to do more than just
             // send up a debug message
             if (LOG.isDebugEnabled()) {
                 LOG.debug("IOException caught while retrieving jar properties - " + ioe.getMessage());
             }
-            poms = Collections.EMPTY_LIST; // maybe avoiding NPE later
+            return Collections.emptyList(); // maybe avoiding NPE later
         }
     }
-    
-    public List<Properties> getJarPoms()
-    {
-        return poms;
-    }
-    
-    public Iterator<URL> getPluginsLoaded() 
-    {
+
+    public Iterator<URL> getPluginsLoaded() {
         try {
             return ClassLoaderUtil.getResources("struts-plugin.xml", ShowJarsAction.class,
false);
         } catch (IOException e) {
@@ -71,4 +57,5 @@ public class ShowJarsAction extends Acti
         }
         return null;
     }
+
 }

Modified: struts/struts2/trunk/plugins/config-browser/src/main/java/org/apache/struts2/config_browser/ShowValidatorAction.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/plugins/config-browser/src/main/java/org/apache/struts2/config_browser/ShowValidatorAction.java?rev=1302806&r1=1302805&r2=1302806&view=diff
==============================================================================
--- struts/struts2/trunk/plugins/config-browser/src/main/java/org/apache/struts2/config_browser/ShowValidatorAction.java
(original)
+++ struts/struts2/trunk/plugins/config-browser/src/main/java/org/apache/struts2/config_browser/ShowValidatorAction.java
Tue Mar 20 09:17:02 2012
@@ -21,6 +21,14 @@
 
 package org.apache.struts2.config_browser;
 
+import com.opensymphony.xwork2.inject.Inject;
+import com.opensymphony.xwork2.util.logging.Logger;
+import com.opensymphony.xwork2.util.logging.LoggerFactory;
+import com.opensymphony.xwork2.util.reflection.ReflectionContextFactory;
+import com.opensymphony.xwork2.util.reflection.ReflectionException;
+import com.opensymphony.xwork2.util.reflection.ReflectionProvider;
+import com.opensymphony.xwork2.validator.Validator;
+
 import java.beans.BeanInfo;
 import java.beans.IntrospectionException;
 import java.beans.Introspector;
@@ -30,14 +38,6 @@ import java.util.Map;
 import java.util.Set;
 import java.util.TreeSet;
 
-import com.opensymphony.xwork2.inject.Inject;
-import com.opensymphony.xwork2.util.logging.Logger;
-import com.opensymphony.xwork2.util.logging.LoggerFactory;
-import com.opensymphony.xwork2.util.reflection.ReflectionContextFactory;
-import com.opensymphony.xwork2.util.reflection.ReflectionException;
-import com.opensymphony.xwork2.util.reflection.ReflectionProvider;
-import com.opensymphony.xwork2.validator.Validator;
-
 /**
  * ShowValidatorAction
  *
@@ -47,8 +47,8 @@ public class ShowValidatorAction extends
 
     private static Logger LOG = LoggerFactory.getLogger(ShowValidatorAction.class);
 
-    Set properties = Collections.EMPTY_SET;
-    int selected = 0;
+    private Set<PropertyInfo> properties = Collections.emptySet();
+    private int selected = 0;
     
     ReflectionProvider reflectionProvider;
     ReflectionContextFactory reflectionContextFactory;
@@ -76,16 +76,16 @@ public class ShowValidatorAction extends
     }
 
     public Validator getSelectedValidator() {
-        return (Validator) validators.get(selected);
+        return validators.get(selected);
     }
 
     public String execute() throws Exception {
         loadValidators();
         Validator validator = getSelectedValidator();
-        properties = new TreeSet();
+        properties = new TreeSet<PropertyInfo>();
         try {
-            Map context = reflectionContextFactory.createDefaultContext(validator);
-            BeanInfo beanInfoFrom = null;
+            Map<String, Object> context = reflectionContextFactory.createDefaultContext(validator);
+            BeanInfo beanInfoFrom;
             try {
                 beanInfoFrom = Introspector.getBeanInfo(validator.getClass(), Object.class);
             } catch (IntrospectionException e) {
@@ -96,8 +96,7 @@ public class ShowValidatorAction extends
 
             PropertyDescriptor[] pds = beanInfoFrom.getPropertyDescriptors();
 
-            for (int i = 0; i < pds.length; i++) {
-                PropertyDescriptor pd = pds[i];
+            for (PropertyDescriptor pd : pds) {
                 String name = pd.getName();
                 Object value = null;
                 if (pd.getReadMethod() == null) {
@@ -118,10 +117,11 @@ public class ShowValidatorAction extends
             addActionError("Unable to retrieve properties: " + e.toString());
         }
 
-        if (hasErrors())
+        if (hasErrors()) {
             return ERROR;
-        else
+        } else {
             return SUCCESS;
+        }
     }
 
     public static class PropertyInfo implements Comparable {

Modified: struts/struts2/trunk/plugins/config-browser/src/main/resources/config-browser/actionNames.ftl
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/plugins/config-browser/src/main/resources/config-browser/actionNames.ftl?rev=1302806&r1=1302805&r2=1302806&view=diff
==============================================================================
--- struts/struts2/trunk/plugins/config-browser/src/main/resources/config-browser/actionNames.ftl
(original)
+++ struts/struts2/trunk/plugins/config-browser/src/main/resources/config-browser/actionNames.ftl
Tue Mar 20 09:17:02 2012
@@ -32,7 +32,7 @@
                     <@s.param name="namespace">${namespace}</@s.param>
                     <@s.param name="actionName">${name}</@s.param>
                 </@s.url>
-                <li><a href="${showConfig}">${name}</a></li>
+                <li><@s.a href="%{showConfig}">${name}</@s.a></li>
 			</#list>
 			</ul>
 		</td>

Modified: struts/struts2/trunk/plugins/config-browser/src/main/resources/config-browser/page-header.ftl
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/plugins/config-browser/src/main/resources/config-browser/page-header.ftl?rev=1302806&r1=1302805&r2=1302806&view=diff
==============================================================================
--- struts/struts2/trunk/plugins/config-browser/src/main/resources/config-browser/page-header.ftl
(original)
+++ struts/struts2/trunk/plugins/config-browser/src/main/resources/config-browser/page-header.ftl
Tue Mar 20 09:17:02 2012
@@ -41,7 +41,7 @@
   
 <table border="0" cellspacing="0" cellpadding="4" width="100%" id="main">
 	<tr valign="top">
-	    <#if !hideNav?exists>		<td id="leftcol" width="20%">
+	    <#if !hideNav??>		<td id="leftcol" width="20%">
 			<div id="navcolumn">
 				<#-- Quick hack to show menu features :)
 -->				<#-- This should be done via contribution from the actions
@@ -61,15 +61,34 @@
 					</div>
 				</div>
 				<div id="projecttools" class="toolgroup">
-					<#if namespaces?exists>					<div class="label"><strong>Namespaces</strong></div>
-					<div class="body">
-						<#foreach namespace in namespaces>						<div><@s.url id="namespaceLink"
action="actionNames" includeParams="none"><@s.param name="namespace">${namespace}</@s.param></@s.url><a
href="${namespaceLink}"><#if namespace == ""> default <#else> ${namespace}
</#if></a></div>
-						</#foreach>					</div>
-					</#if>				</div>				
+					<#if namespaces??>
+                    <div class="label"><strong>Namespaces</strong></div>
+                    <div class="body">
+                    <#foreach namespace in namespaces>
+                        <div>
+                            <@s.url var="namespaceLink" action="actionNames" includeParams="none">
+                                <@s.param name="namespace">${namespace}</@s.param>
+                            </@s.url>
+                            <@s.a href="%{namespaceLink}"><#if namespace == "">
default <#else> ${namespace} </#if></@s.a>
+                        </div>
+                    </#foreach>
+                    </div>
+					</#if>
+                </div>
 				<div class="toolgroup">
-					<#if actionNames?exists>					<div class="label"><strong>Actions in
<#if namespace == ""> default <#else> ${namespace} </#if></strong></div>
-                        <#foreach name in actionNames>                        <div><@s.url
id="actionLink" action="showConfig" includeParams="none"><@s.param name="namespace">${namespace}</@s.param><@s.param
name="actionName">${name}</@s.param></@s.url><a href="${actionLink}">${name}</a></div>
-						</#foreach>					</#if>				</div>
+					<#if actionNames??>
+                    <div class="label"><strong>Actions in <#if namespace ==
""> default <#else> ${namespace} </#if></strong></div>
+                    <#foreach name in actionNames>
+                        <div>
+                            <@s.url id="actionLink" action="showConfig" includeParams="none"
escapeAmp="false">
+                                <@s.param name="namespace">${namespace}</@s.param>
+                                <@s.param name="actionName">${name}</@s.param>
+                            </@s.url>
+                            <@s.a href="%{actionLink}">${name}</@s.a>
+                        </div>
+				    </#foreach>
+                    </#if>
+                </div>
 			</div>
 		</td>
 		</#if>		<td>

Modified: struts/struts2/trunk/plugins/config-browser/src/main/resources/config-browser/showConfig.ftl
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/plugins/config-browser/src/main/resources/config-browser/showConfig.ftl?rev=1302806&r1=1302805&r2=1302806&view=diff
==============================================================================
--- struts/struts2/trunk/plugins/config-browser/src/main/resources/config-browser/showConfig.ftl
(original)
+++ struts/struts2/trunk/plugins/config-browser/src/main/resources/config-browser/showConfig.ftl
Tue Mar 20 09:17:02 2012
@@ -34,8 +34,8 @@
 		${p}
 	</#list></td></tr>
 
-	<tr><td>Default location:</td><td> <a href="${base}${namespace}/${actionName}.${extension}">
-		${base}${namespace}/${actionName}.${extension}
+	<tr><td>Default location:</td><td> <a href="${base}${namespace}/${actionName}<#if
extension != ''>.${extension}</#if>">
+		${base}${namespace}/${actionName}<#if extension != "">.${extension}</#if>
 	</a>
 	</td></tr>
 </table>

Modified: struts/struts2/trunk/plugins/config-browser/src/main/resources/config-browser/showValidators.ftl
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/plugins/config-browser/src/main/resources/config-browser/showValidators.ftl?rev=1302806&r1=1302805&r2=1302806&view=diff
==============================================================================
--- struts/struts2/trunk/plugins/config-browser/src/main/resources/config-browser/showValidators.ftl
(original)
+++ struts/struts2/trunk/plugins/config-browser/src/main/resources/config-browser/showValidators.ftl
Tue Mar 20 09:17:02 2012
@@ -24,7 +24,7 @@
 <table width="100%">
     <tr><th>Field</th><th>Type</th><th>&nbsp;</th></tr>
     <#assign row = 0>
-    	<#if validators?exists>
+    	<#if validators??>
         <#foreach i in validators>       
         <tr <#if i_index%2 gt 0>class="b"<#else>class="a"</#if>>
         	<td>${i.fieldName!"(see expression)"}</td>

Modified: struts/struts2/trunk/plugins/config-browser/src/main/resources/config-browser/tigris-macros.ftl
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/plugins/config-browser/src/main/resources/config-browser/tigris-macros.ftl?rev=1302806&r1=1302805&r2=1302806&view=diff
==============================================================================
--- struts/struts2/trunk/plugins/config-browser/src/main/resources/config-browser/tigris-macros.ftl
(original)
+++ struts/struts2/trunk/plugins/config-browser/src/main/resources/config-browser/tigris-macros.ftl
Tue Mar 20 09:17:02 2012
@@ -44,7 +44,7 @@
 
 <#macro tab name, url, isSelected>
 	<#if isSelected == "true">
-		<th><a href="${url}">${name}</h></td>
+		<th><a href="${url}">${name}</a></th>
 		<#else>
 		<td><a href="${url}">${name}</a></td>
 	</#if>

Modified: struts/struts2/trunk/plugins/config-browser/src/main/resources/config-browser/validatorDetails.ftl
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/plugins/config-browser/src/main/resources/config-browser/validatorDetails.ftl?rev=1302806&r1=1302805&r2=1302806&view=diff
==============================================================================
--- struts/struts2/trunk/plugins/config-browser/src/main/resources/config-browser/validatorDetails.ftl
(original)
+++ struts/struts2/trunk/plugins/config-browser/src/main/resources/config-browser/validatorDetails.ftl
Tue Mar 20 09:17:02 2012
@@ -34,11 +34,11 @@
     <#foreach prop in properties>
     	<tr <#if prop_index%2 gt 0>class="b"<#else>class="a"</#if>>
             <td>${prop.name}</td>
-            <td><#if prop.value?exists>
+            <td><#if prop.value??>
                     <#if prop.value?is_collection>(size = ${prop.value?size})<#foreach
v in prop.value>${v.value}, </#foreach>
                     <#else>${prop.value?string}</#if>
                 <#else> <b>null</b> </#if></td>
-            <td><#if prop.value?exists && prop.value?is_collection>(collection)<#else>${prop.type.name}</#if></td>
+            <td><#if prop.value?? && prop.value?is_collection>(collection)<#else>${prop.type.name}</#if></td>
         </tr>
     </#foreach></table>
 <#call endPage>



Mime
View raw message