GetLocalPageNameTagpublic class GetLocalPageNameTag extends TagSupport This class implements a custom action that inserts a page
name, matching the currently selected locale, in the
response body.
It uses the com.ora.jsp.beans.locale.LocaleBean. |
Fields Summary |
---|
private String | name | private String | pageName |
Methods Summary |
---|
public int | doEndTag()Uses the LocaleBean, available in a scope as a variable
specified by the "name" property, to retrieve the page
name specified by the "pageName" property, matching the
current locale. The result is added to the response body.
Object o = pageContext.findAttribute(name);
if (o == null) {
throw new JspException("LocaleBean named " + name + " not found");
}
if (!(o instanceof LocaleBean)) {
throw new JspException("The object named " + name +
" is not a LocaleBean");
}
JspWriter out = pageContext.getOut();
try {
out.write(((LocaleBean) o).getPageName(pageName));
}
catch (IOException e) {} // Ignore
return EVAL_PAGE;
| public void | release()Releases all instance variables.
name = null;
pageName = null;
super.release();
| public void | setName(java.lang.String name)Sets the LocaleBean name property.
this.name = name;
| public void | setPageName(java.lang.String pageName)Sets the base page name property.
this.pageName = pageName;
|
|