Uploaded image for project: 'Commons Jelly'
  1. Commons Jelly
  2. JELLY-196

SwitchTag can not be reused if default encountered

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 1.0
    • 1.0-RC2
    • core / taglib.core
    • None
    • 1.0-RC2-SNAPSHOT

    Description

      Script as
      <j:forEach var="var" items="a,b">
      <j:switch on="${var}">
      <j:case value="unencountered1">
      <j:set var="res" value="1"/>
      </j:case>
      <j:case value="unencountered2">
      <j:set var="res" value="2"/>
      </j:case>
      <j:default>
      <j:set var="res" value="default"/>
      </j:default>
      </j:switch>
      </j:forEach>

      throws "<default> should be the last tag within a <switch>" because of SwitchTag boolean property defaultEncountered is not reset.

      Attachments

        1. patch_2005.01.18_switchTag.test.txt
          3 kB
          Marc DeXeT
        2. patch_2005.01.18_switchTag.txt
          0.7 kB
          Marc DeXeT

        Activity

          People

            Unassigned Unassigned
            marc_dexet Marc DeXeT
            Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: