| CODENOTIFIER | HelpYou are not signed inSign in |
Project: Stripes
Revision: 950
Author: tfenne
Date: 29 Jul 2008 14:30:37
Changes:Changed to add the wizard fields tag to the tag stack so that getParent() can work across pages.
Files:| ... | ...@@ -20,6 +20,7 @@ | |
| 20 | 20 | import net.sourceforge.stripes.util.CollectionUtil; |
| 21 | 21 | |
| 22 | 22 | import javax.servlet.jsp.JspException; |
| 23 | import javax.servlet.jsp.tagext.TryCatchFinally; | |
| 23 | 24 | import java.util.HashSet; |
| 24 | 25 | import java.util.Map; |
| 25 | 26 | import java.util.Set; |
| ... | ...@@ -36,7 +37,7 @@ | |
| 36 | 37 | * |
| 37 | 38 | * @author Tim Fennell |
| 38 | 39 | */ |
| 39 | public class WizardFieldsTag extends StripesTagSupport { | |
| 40 | public class WizardFieldsTag extends StripesTagSupport implements TryCatchFinally { | |
| 40 | 41 | private boolean currentFormOnly = false; |
| 41 | 42 | |
| 42 | 43 | /** |
| ... | ...@@ -51,6 +52,7 @@ | |
| 51 | 52 | /** Skips over the body because there shouldn't be one. */ |
| 52 | 53 | @Override |
| 53 | 54 | public int doStartTag() throws JspException { |
| 55 | getTagStack().push(this); | |
| 54 | 56 | return SKIP_BODY; |
| 55 | 57 | } |
| 56 | 58 | |
| ... | ...@@ -125,4 +127,18 @@ | |
| 125 | 127 | |
| 126 | 128 | return EVAL_PAGE; |
| 127 | 129 | } |
| 130 | ||
| 131 | /** Rethrows the passed in throwable in all cases. */ | |
| 132 | public void doCatch(Throwable throwable) throws Throwable { throw throwable; } | |
| 133 | ||
| 134 | /** | |
| 135 | * Used to ensure that the input tag is always removed from the tag stack so that there is | |
| 136 | * never any confusion about tag-parent hierarchies. | |
| 137 | */ | |
| 138 | public void doFinally() { | |
| 139 | try { getTagStack().pop(); } | |
| 140 | catch (Throwable t) { | |
| 141 | /* Suppress anything, because otherwise this might mask any causal exception. */ | |
| 142 | } | |
| 143 | } | |
| 128 | 144 | } |