| CODENOTIFIER | HelpYou are not signed inSign in |
Project: Stripes
Revision: 951
Author: bengunter
Date: 15 Aug 2008 09:44:46
Changes:Fixed STS-599. FormTag checks the session scope for its ActionBean if it doesn't fine one in the request scope.
Files:| ... | ...@@ -29,6 +29,7 @@ | |
| 29 | 29 | |
| 30 | 30 | import javax.servlet.http.HttpServletRequest; |
| 31 | 31 | import javax.servlet.http.HttpServletResponse; |
| 32 | import javax.servlet.http.HttpSession; | |
| 32 | 33 | import javax.servlet.jsp.JspException; |
| 33 | 34 | import javax.servlet.jsp.JspWriter; |
| 34 | 35 | import javax.servlet.jsp.tagext.BodyTag; |
| ... | ...@@ -342,8 +343,15 @@ | |
| 342 | 343 | * @return ActionBean the ActionBean bound to the form if there is one |
| 343 | 344 | */ |
| 344 | 345 | protected ActionBean getActionBean() { |
| 345 | return (ActionBean) getPageContext().getRequest().getAttribute(this.actionWithoutContext); | |
| 346 | } | |
| 346 | HttpServletRequest request = (HttpServletRequest) getPageContext().getRequest(); | |
| 347 | ActionBean bean = (ActionBean) request.getAttribute(this.actionWithoutContext); | |
| 348 | if (bean == null) { | |
| 349 | HttpSession session = request.getSession(false); | |
| 350 | if (session != null) | |
| 351 | bean = (ActionBean) session.getAttribute(this.actionWithoutContext); | |
| 352 | } | |
| 353 | return bean; | |
| 354 | } | |
| 347 | 355 | |
| 348 | 356 | /** |
| 349 | 357 | * Returns true if the ActionBean this form posts to represents a Wizard action bean and |