Revision: 371
Author: tfenne
Date: 2006-08-11 05:06:16 -0700 (Fri, 11 Aug 2006)
ViewCVS: http://svn.sourceforge.net/stripes/?rev=371&view=rev
Log Message:
-----------
Fix for issue reported by Ben Gunter, where an NPE is caused in useActionBean
when the actionBean is already present during render and validation errors
exist.
Modified Paths:
--------------
trunk/stripes/src/net/sourceforge/stripes/tag/UseActionBeanTag.java
Modified: trunk/stripes/src/net/sourceforge/stripes/tag/UseActionBeanTag.java
===================================================================
--- trunk/stripes/src/net/sourceforge/stripes/tag/UseActionBeanTag.java
2006-08-11 00:13:39 UTC (rev 370)
+++ trunk/stripes/src/net/sourceforge/stripes/tag/UseActionBeanTag.java
2006-08-11 12:06:16 UTC (rev 371)
@@ -82,7 +82,8 @@
*/
public int doStartTag() throws JspException {
// Check to see if the action bean already exists
- boolean beanNotPresent = getPageContext().findAttribute(binding) ==
null;
+ ActionBean actionBean = (ActionBean)
getPageContext().findAttribute(binding);
+ boolean beanNotPresent = actionBean == null;
try {
final Configuration config = StripesFilter.getConfiguration();
@@ -110,6 +111,10 @@
}
});
}
+ else {
+ ctx.setActionBean(actionBean);
+ ctx.setActionBeanContext(actionBean.getContext());
+ }
// Then, if and only if an event was specified, run handler
resolution
if (resolution == null && event != null && (beanNotPresent ||
this.alwaysExecuteEvent)) {
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Stripes-development mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/stripes-development