Revision: 1072
          http://stripes.svn.sourceforge.net/stripes/?rev=1072&view=rev
Author:   bengunter
Date:     2009-02-28 21:35:32 +0000 (Sat, 28 Feb 2009)

Log Message:
-----------
Fixed a NPE reported by Scott Archer for STS-606. Before, if the s:form 
attribute "action" was set but did not map to an ActionBean then the "action" 
value would be used as the ActionBean's URL binding, basically acting as a 
placeholder. My changes for STS-606 started using null instead of that 
placeholder, which caused problems in several spots. This update fixes that.

Modified Paths:
--------------
    trunk/stripes/src/net/sourceforge/stripes/tag/FormTag.java

Modified: trunk/stripes/src/net/sourceforge/stripes/tag/FormTag.java
===================================================================
--- trunk/stripes/src/net/sourceforge/stripes/tag/FormTag.java  2009-02-27 
21:02:57 UTC (rev 1071)
+++ trunk/stripes/src/net/sourceforge/stripes/tag/FormTag.java  2009-02-28 
21:35:32 UTC (rev 1072)
@@ -87,12 +87,17 @@
     public String getAction() { return this.actionWithoutContext; }
 
     /** Get the URL binding for the form's {...@link ActionBean} from the 
{...@link ActionResolver}. */
-       protected String getActionBeanUrlBinding() {
+    protected String getActionBeanUrlBinding() {
         ActionResolver resolver = 
StripesFilter.getConfiguration().getActionResolver();
-        if (actionBeanClass == null)
-            return resolver.getUrlBindingFromPath(actionWithoutContext);
-        else
+        if (actionBeanClass == null) {
+            String binding = 
resolver.getUrlBindingFromPath(actionWithoutContext);
+            if (binding == null)
+                binding = actionWithoutContext;
+            return binding;
+        }
+        else {
             return resolver.getUrlBinding(actionBeanClass);
+        }
     }
 
     /** Lazily looks up and returns the type of action bean the form will 
submit to. */


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
Stripes-development mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/stripes-development

Reply via email to