Line | Hits | Source |
---|---|---|
1 | /* | |
2 | Chrysalis Web Framework [http://chrysalis.sourceforge.net] | |
3 | Copyright (c) 2002, 2003, 2004, Paul Strack | |
4 | ||
5 | All rights reserved. | |
6 | ||
7 | Redistribution and use in source and binary forms, with or without | |
8 | modification, are permitted provided that the following conditions are met: | |
9 | ||
10 | 1. Redistributions of source code must retain the above copyright notice, this | |
11 | list of conditions and the following disclaimer. | |
12 | ||
13 | 2. Redistributions in binary form must reproduce the above copyright notice, | |
14 | this list of conditions and the following disclaimer in the documentation | |
15 | and/or other materials provided with the distribution. | |
16 | ||
17 | 3. Neither the name of the copyright holder nor the names of its contributors | |
18 | may be used to endorse or promote products derived from this software without | |
19 | specific prior written permission. | |
20 | ||
21 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND | |
22 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | |
23 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | |
24 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR | |
25 | ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | |
26 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | |
27 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON | |
28 | ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | |
29 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | |
30 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | |
31 | */ | |
32 | ||
33 | package org.chwf.taglib.jutil; | |
34 | ||
35 | import javax.servlet.jsp.JspException; | |
36 | ||
37 | /** | |
38 | * Tag handler for the <code><elseIf></code> tag. | |
39 | * | |
40 | * @author <a href="mailto:pfstrack@users.sourceforge.net">Paul Strack</a> | |
41 | */ | |
42 | 10 | public class ElseIfTag extends IfTag { |
43 | ||
44 | /** | |
45 | * Calls superclass method. Is present here because of a bug in some servlet | |
46 | * engines that requires tag attibute setters to be defined in the tag class | |
47 | * itself. | |
48 | * | |
49 | * @param objectName The object name. | |
50 | * @throws JspException For errors. | |
51 | */ | |
52 | public void setObject(String objectName) throws JspException { | |
53 | 10 | super.setObject(objectName); |
54 | 10 | } |
55 | ||
56 | /** | |
57 | * Calls superclass method. Is present here because of a bug in some servlet | |
58 | * engines that requires tag attibute setters to be defined in the tag class | |
59 | * itself. | |
60 | * | |
61 | * @param property The property name. | |
62 | * @throws JspException For errors. | |
63 | */ | |
64 | public void setProperty(String property) throws JspException { | |
65 | 10 | super.setProperty(property); |
66 | 10 | } |
67 | ||
68 | /** | |
69 | * Calls superclass method. Is present here because of a bug in some servlet | |
70 | * engines that requires tag attibute setters to be defined in the tag class | |
71 | * itself. | |
72 | * | |
73 | * @param el The EL expression. | |
74 | */ | |
75 | public void setEl(String el) { | |
76 | 1 | super.setEl(el); |
77 | 1 | } |
78 | ||
79 | /** | |
80 | * Get results of test. | |
81 | * | |
82 | * @return false if the last test was true; otherwise the value of the given | |
83 | * object property. | |
84 | * @throws JspException For expression language parse errors. | |
85 | */ | |
86 | public boolean getTestResult() throws JspException { | |
87 | 4 | if (Boolean.TRUE.equals(this.pageContext.getAttribute(LAST_IF_RESULT))) { |
88 | 2 | return false; |
89 | } else { | |
90 | 2 | return super.getTestResult(); |
91 | } | |
92 | } | |
93 | } |
this report was generated by version 1.0.5 of jcoverage. |
copyright © 2003, jcoverage ltd. all rights reserved. |