1. opensymphony
  2. webwork


tmjee  committed 6d5d056

- Else tag body displayed when it shouldn't

Issue number: WW-1343
Obtained from:
Submitted by:
Reviewed by:
CVS: ----------------------------------------------------------------------
CVS: Issue number:
CVS: If this change addresses one or more issues,
CVS: then enter the issue number(s) here.
CVS: Obtained from:
CVS: If this change has been taken from another system,
CVS: then name the system in this line, otherwise delete it.
CVS: Submitted by:
CVS: If this code has been contributed to the project by someone else; i.e.,
CVS: they sent us a patch or a set of diffs, then include their name/email
CVS: address here. If this is your work then delete this line.
CVS: Reviewed by:
CVS: If we are doing pre-commit code reviews and someone else has
CVS: reviewed your changes, include their name(s) here.
CVS: If you have not had it reviewed then delete this line.

git-svn-id: http://svn.opensymphony.com/svn/webwork/trunk@2706573baa09-0c28-0410-bef9-dab3c582ae83

  • Participants
  • Parent commits 78d1b2c
  • Branches master

Comments (0)

Files changed (2)

File src/java/com/opensymphony/webwork/components/ElseIf.java

View file
     public boolean end(Writer writer, String body) {
+        if (answer == null) {
+            answer = Boolean.FALSE;
+        }
+        if (answer.booleanValue()) {
+            stack.getContext().put(If.ANSWER, answer);
+        }
         return super.end(writer, "");

File src/java/com/opensymphony/webwork/components/If.java

View file
     public boolean end(Writer writer, String body) {
+        stack.getContext().put(ANSWER, answer);
         return super.end(writer, body);