bacoAlunos
ENGSOFT2019
BlueGrey
calm
Elegant
Català-Valencià - Catalan
中文 - Chinese (Simplified)
中文 - Chinese (Traditional)
Česky - Czech
Dansk - Danish
Nederlands - Dutch
English - English
Suomi - Finnish
Français - French
Deutsch - German
עברית - Hebrew
हिंदी - Hindi
Magyar - Hungarian
Bahasa Indonesia - Indonesian
Italiano - Italian
日本語 - Japanese
한국어 - Korean
मराठी - Marathi
Norsk - Norwegian
Polski - Polish
Português - Portuguese
Português - Portuguese (Brazil)
Русский - Russian
Slovenčina - Slovak
Slovenščina - Slovenian
Español - Spanish
Svenska - Swedish
Türkçe - Turkish
Oëzbekcha - Uzbek
Subversion Repositories
bacoAlunos
(root)
/
impl
/
src
/
java
/
jomm
/
web
/
tags
/
NotEqualBeansTag.java
@ 1
- Rev
Rev
Blame
|
Compare with Previous
|
Last modification
|
View Log
|
RSS feed
/*
* writeDocumentPropertyTimes.java
*
* Created on 1 de Abril de 2003, 20:36
*/
package
jomm.web.tags
;
/**
*
* @author Jorge Machado
*/
import
org.apache.log4j.Logger
;
import
org.apache.struts.util.RequestUtils
;
import
javax.servlet.jsp.JspException
;
import
javax.servlet.jsp.JspWriter
;
import
javax.servlet.jsp.tagext.BodyTagSupport
;
public
class
NotEqualBeansTag
extends
BodyTagSupport
{
private
static
1.
5
.0/docs/api/java/util/logging/Logger.html">
Logger
logger =
1.
5
.0/docs/api/java/util/logging/Logger.html">
Logger
.
getLogger
(
NotEqualBeansTag.
class
)
;
/**
* Name of the bean that contains the data we will be rendering.
*/
protected
1.
5
.0/docs/api/java/lang/String.html">
String
name1 =
null
;
public
1.
5
.0/docs/api/java/lang/String.html">
String
getName1
(
)
{
return
(
this
.
name1
)
;
}
public
void
setName1
(
1.
5
.0/docs/api/java/lang/String.html">
String
name1
)
{
this
.
name1
= name1
;
}
/**
* Name of the bean that contains the data we will be rendering.
*/
protected
1.
5
.0/docs/api/java/lang/String.html">
String
name2 =
null
;
public
1.
5
.0/docs/api/java/lang/String.html">
String
getName2
(
)
{
return
(
this
.
name2
)
;
}
public
void
setName2
(
1.
5
.0/docs/api/java/lang/String.html">
String
name2
)
{
this
.
name2
= name2
;
}
/**
* Name of the property to be accessed on the specified bean.
*/
protected
1.
5
.0/docs/api/java/lang/String.html">
String
property1 =
null
;
public
1.
5
.0/docs/api/java/lang/String.html">
String
getProperty1
(
)
{
return
(
this
.
property1
)
;
}
public
void
setProperty1
(
1.
5
.0/docs/api/java/lang/String.html">
String
property1
)
{
this
.
property1
= property1
;
}
/**
* Name of the property to be accessed on the specified bean.
*/
protected
1.
5
.0/docs/api/java/lang/String.html">
String
property2 =
null
;
public
1.
5
.0/docs/api/java/lang/String.html">
String
getProperty2
(
)
{
return
(
this
.
property2
)
;
}
public
void
setProperty2
(
1.
5
.0/docs/api/java/lang/String.html">
String
property2
)
{
this
.
property2
= property2
;
}
/**
* The scope to be searched to retrieve the specified bean.
*/
protected
1.
5
.0/docs/api/java/lang/String.html">
String
scope =
null
;
public
1.
5
.0/docs/api/java/lang/String.html">
String
getScope
(
)
{
return
(
this
.
scope
)
;
}
public
void
setScope
(
1.
5
.0/docs/api/java/lang/String.html">
String
scope
)
{
this
.
scope
= scope
;
}
public
int
doStartTag
(
)
throws
JspException
{
return
EVAL_BODY_TAG
;
}
public
int
doEndTag
(
)
throws
JspException
{
// Look up the requested bean (if necessary)
5+
0
%
2Fdocs
%
2Fapi+Object">
Object
bean =
null
;
// Look up the requested property value
5+
0
%
2Fdocs
%
2Fapi+Object">
Object
value1 =
RequestUtils.
lookup
(
pageContext, name1, property1,
null
)
;
5+
0
%
2Fdocs
%
2Fapi+Object">
Object
value2 =
RequestUtils.
lookup
(
pageContext, name2, property2,
null
)
;
if
(
value1 ==
null
|| value2 ==
null
)
throw
new
JspException
(
"pubperiodic:Error bean 1 or bean 2 are null"
)
;
if
(
!
value1.
equals
(
value2
)
&&
bodyContent
!
=
null
)
{
1.
5
.0/docs/api/java/lang/String.html">
String
toPage = bodyContent.
getString
(
)
.
trim
(
)
;
JspWriter writer = pageContext.
getOut
(
)
;
try
{
writer.
write
(
toPage
)
;
}
catch
(
1.
5
.0/docs/api/java/lang/Exception.html">
Exception
e
)
{
logger.
error
(
e,e
)
;
throw
new
JspException
(
e
)
;
}
}
// Continue processing this page
return
EVAL_PAGE
;
}
}