com.ora.jsp.tags.generic
Class GetLocalTextTag

java.lang.Object
  |
  +--javax.servlet.jsp.tagext.TagSupport
        |
        +--com.ora.jsp.tags.generic.GetLocalTextTag
All Implemented Interfaces:
java.io.Serializable, javax.servlet.jsp.tagext.Tag

public class GetLocalTextTag
extends javax.servlet.jsp.tagext.TagSupport

This class implements a custom action that inserts a text resource, matching the currently selected locale, in the response body. It uses the com.ora.jsp.beans.locale.LocaleBean.

Version:
1.0
Author:
Hans Bergsten, Gefion software
See Also:
Serialized Form

Field Summary
private  java.lang.String key
           
private  java.lang.String name
           
 
Fields inherited from class javax.servlet.jsp.tagext.TagSupport
id, pageContext, parent, values
 
Fields inherited from interface javax.servlet.jsp.tagext.Tag
EVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE
 
Constructor Summary
GetLocalTextTag()
           
 
Method Summary
 int doEndTag()
          Uses the LocaleBean, available in a scope as a variable specified by the "name" property, to retrieve the text resource specified by the "key" property.
 void release()
          Releases all instance variables.
 void setKey(java.lang.String key)
          Sets the resource key property.
 void setName(java.lang.String name)
          Sets the LocaleBean name property.
 
Methods inherited from class javax.servlet.jsp.tagext.TagSupport
doStartTag, findAncestorWithClass, getId, getParent, getValue, getValues, removeValue, setId, setPageContext, setParent, setValue
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

name

private java.lang.String name

key

private java.lang.String key
Constructor Detail

GetLocalTextTag

public GetLocalTextTag()
Method Detail

setName

public void setName(java.lang.String name)
Sets the LocaleBean name property.
Parameters:
name - the name of the LocaleBean

setKey

public void setKey(java.lang.String key)
Sets the resource key property.
Parameters:
key - the resource key in the current ResourceBundle

doEndTag

public int doEndTag()
             throws javax.servlet.jsp.JspException
Uses the LocaleBean, available in a scope as a variable specified by the "name" property, to retrieve the text resource specified by the "key" property. The result is added to the response body.
Overrides:
doEndTag in class javax.servlet.jsp.tagext.TagSupport

release

public void release()
Releases all instance variables.
Overrides:
release in class javax.servlet.jsp.tagext.TagSupport