📄 defaultlookupvalue.java
字号:
package jsp.tags.dapact.lookup;
/**
* Title: Data Aware Processing And Control Tags
* Description: Tag library for the processing and controlling the input and output of data.
* Copyright: LGPL (http://www.gnu.org/copyleft/lesser.html)
* Compile Date: @compile_date@
* @author Allen M Servedio
* @amp_sign@version @VERSION@
*/
import javax.servlet.jsp.PageContext;
import javax.servlet.jsp.tagext.TagSupport;
/**
* Default lookup value object - implements Null Object pattern - as in it does not
* do anything, just returns the values.
*/
public class DefaultLookupValue extends BaseLookupValue
{
/**
* Default constructor.
*/
public DefaultLookupValue()
{
}
/**
* This function will be called by the tags when they want to store a string object
* (most common case: storing attributes). As the default, it just returns the value.
*
* @param key the key of the value to be saved.
* @param value the value to be added - this will be overridden by what is returned by
* this function.
* @param tag the tag that will be used to save the value.
* @param pc the page context associated with the tag that is also a parameter. This
* will be used to search parameters and contexts (page, session, request, and servlet).
*
* @return the lookedup value.
*/
public String lookupValue(String key, String value, TagSupport tag, PageContext pc)
{
return value;
}
/**
* This function will be called by the tags when they want to store a general
* non-String object. As the default, it just returns the value.
*
* @param key the key of the value to be saved.
* @param value the value to be added - this will be overridden by what is returned by
* this function.
* @param tag the tag that will be used to save the value.
* @param pc the page context associated with the tag that is also a parameter. This
* will be used to search parameters and contexts (page, session, request, and servlet).
*
* @return the lookedup value.
*/
public Object lookupValue(String key, Object value, TagSupport tag, PageContext pc)
{
return value;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -