public void doTag(XMLOutput output) throws JellyTagException { SwitchTag tag = (SwitchTag)findAncestorWithClass(SwitchTag.class); if(null == tag) { throw new JellyTagException("This tag must be enclosed inside a <switch> tag" ); } if(tag.hasDefaultBeenEncountered()) { throw new JellyTagException("Only one <default> tag is allowed per <switch>."); } tag.defaultEncountered(); if(tag.isFallingThru() || (!tag.hasSomeCaseMatched())) { tag.caseMatched(); tag.setFallingThru(fallThru); invokeBody(output); } }
public void doTag(XMLOutput output) throws MissingAttributeException, JellyTagException { if(null == this.valueExpression) { throw new MissingAttributeException("value"); } SwitchTag tag = (SwitchTag)findAncestorWithClass(SwitchTag.class); if(null == tag) { throw new JellyTagException("This tag must be enclosed inside a <switch> tag" ); } if(tag.hasDefaultBeenEncountered()) { throw new JellyTagException("<default> should be the last tag within a <switch>" ); } Object value = valueExpression.evaluate(context); if(tag.isFallingThru() || (null == tag.getValue() && null == value) || (null != tag.getValue() && tag.getValue().equals(value))) { tag.caseMatched(); tag.setFallingThru(fallThru); invokeBody(output); } }
public void doTag(XMLOutput output) throws MissingAttributeException, JellyTagException { this.defaultEncountered = false; this.someCaseMatched = false; this.fallingThru = false; if(null == on) { throw new MissingAttributeException("on"); } else { value = on.evaluate(context); invokeBody(output); } }
public void doTag(XMLOutput output) throws MissingAttributeException, JellyTagException { if(null == this.valueExpression) { throw new MissingAttributeException("value"); } SwitchTag tag = (SwitchTag)findAncestorWithClass(SwitchTag.class); if(null == tag) { throw new JellyTagException("This tag must be enclosed inside a <switch> tag" ); } if(tag.hasDefaultBeenEncountered()) { throw new JellyTagException("<default> should be the last tag within a <switch>" ); } Object value = valueExpression.evaluate(context); if(tag.isFallingThru() || (null == tag.getValue() && null == value) || (null != tag.getValue() && tag.getValue().equals(value))) { tag.caseMatched(); tag.setFallingThru(fallThru); invokeBody(output); } }
public void doTag(XMLOutput output) throws MissingAttributeException, JellyTagException { this.defaultEncountered = false; this.someCaseMatched = false; this.fallingThru = false; if(null == on) { throw new MissingAttributeException("on"); } else { value = on.evaluate(context); invokeBody(output); } }
public void doTag(XMLOutput output) throws JellyTagException { SwitchTag tag = (SwitchTag)findAncestorWithClass(SwitchTag.class); if(null == tag) { throw new JellyTagException("This tag must be enclosed inside a <switch> tag" ); } if(tag.hasDefaultBeenEncountered()) { throw new JellyTagException("Only one <default> tag is allowed per <switch>."); } tag.defaultEncountered(); if(tag.isFallingThru() || (!tag.hasSomeCaseMatched())) { tag.caseMatched(); tag.setFallingThru(fallThru); invokeBody(output); } }
public void doTag(XMLOutput output) throws MissingAttributeException, JellyTagException { if(null == this.valueExpression) { throw new MissingAttributeException("value"); } SwitchTag tag = (SwitchTag)findAncestorWithClass(SwitchTag.class); if(null == tag) { throw new JellyTagException("This tag must be enclosed inside a <switch> tag" ); } if(tag.hasDefaultBeenEncountered()) { throw new JellyTagException("<default> should be the last tag within a <switch>" ); } Object value = valueExpression.evaluate(context); if(tag.isFallingThru() || (null == tag.getValue() && null == value) || (null != tag.getValue() && tag.getValue().equals(value))) { tag.caseMatched(); tag.setFallingThru(fallThru); invokeBody(output); } }
public void doTag(XMLOutput output) throws MissingAttributeException, JellyTagException { this.defaultEncountered = false; this.someCaseMatched = false; this.fallingThru = false; if(null == on) { throw new MissingAttributeException("on"); } else { value = on.evaluate(context); invokeBody(output); } }
public void doTag(XMLOutput output) throws JellyTagException { SwitchTag tag = (SwitchTag)findAncestorWithClass(SwitchTag.class); if(null == tag) { throw new JellyTagException("This tag must be enclosed inside a <switch> tag" ); } if(tag.hasDefaultBeenEncountered()) { throw new JellyTagException("Only one <default> tag is allowed per <switch>."); } tag.defaultEncountered(); if(tag.isFallingThru() || (!tag.hasSomeCaseMatched())) { tag.caseMatched(); tag.setFallingThru(fallThru); invokeBody(output); } }
public void doTag(XMLOutput output) throws MissingAttributeException, JellyTagException { if(null == this.valueExpression) { throw new MissingAttributeException("value"); } SwitchTag tag = (SwitchTag)findAncestorWithClass(SwitchTag.class); if(null == tag) { throw new JellyTagException("This tag must be enclosed inside a <switch> tag" ); } if(tag.hasDefaultBeenEncountered()) { throw new JellyTagException("<default> should be the last tag within a <switch>" ); } Object value = valueExpression.evaluate(context); if(tag.isFallingThru() || (null == tag.getValue() && null == value) || (null != tag.getValue() && tag.getValue().equals(value))) { tag.caseMatched(); tag.setFallingThru(fallThru); invokeBody(output); } }
public void doTag(XMLOutput output) throws MissingAttributeException, JellyTagException { this.defaultEncountered = false; this.someCaseMatched = false; this.fallingThru = false; if(null == on) { throw new MissingAttributeException("on"); } else { value = on.evaluate(context); invokeBody(output); } }
public void doTag(XMLOutput output) throws JellyTagException { SwitchTag tag = (SwitchTag)findAncestorWithClass(SwitchTag.class); if(null == tag) { throw new JellyTagException("This tag must be enclosed inside a <switch> tag" ); } if(tag.hasDefaultBeenEncountered()) { throw new JellyTagException("Only one <default> tag is allowed per <switch>."); } tag.defaultEncountered(); if(tag.isFallingThru() || (!tag.hasSomeCaseMatched())) { tag.caseMatched(); tag.setFallingThru(fallThru); invokeBody(output); } }