📄 scrollertag.java
字号:
package gov.gdlt.ssgly.taxweb.tag.taglib;
import javax.faces.component.*;
import javax.faces.context.*;
import javax.faces.el.*;
import javax.faces.event.*;
import javax.faces.webapp.*;
import gov.gdlt.ssgly.taxweb.tag.components.*;
/**
* ScrollerTag is the tag handler class for <code>ScrollerComponent.</code>
*/
public class ScrollerTag extends UIComponentTag {
protected String actionListener = null;
protected String navFacetOrientation = null;
protected String pageSize = null;
protected String totalPageCount = null;
protected String style = null;
protected String styleClass = null;
protected String paramList = null;
protected String totalCount = null;
protected String countPage = null;
protected String preImg = null;
protected String nextImg = null;
protected String isJump = null;
/**
* method reference to handle an action event generated as a result of
* clicking on a link that points a particular page in the result-set.
*/
public void setActionListener(String actionListener) {
this.actionListener = actionListener;
}
/*
* When rendering a widget representing "page navigation" where
* should the facet markup be rendered in relation to the page
* navigation widget? Values are "NORTH", "SOUTH", "EAST", "WEST".
* Case insensitive. This can be value or a value binding
* reference expression.
*/
public void setNavFacetOrientation(String navFacetOrientation) {
this.navFacetOrientation = navFacetOrientation;
}
/*
* The data grid component for which this acts as a scroller.
* This can be value or a value binding reference expression.
*/
public void setPageSize(String newPageSize) {
this.pageSize = newPageSize;
}
public void setTotalPageCount(String newValue) {
this.totalPageCount = newValue;
}
public void setStyle(String newValue) {
this.style = newValue;
}
public void setStyleClass(String newValue) {
this.styleClass = newValue;
}
public void setParamList(String newValue) {
this.paramList = newValue;
}
public void setTotalCount(String totalCount) {
this.totalCount = totalCount;
}
public void setCountPage(String CountPage) {
this.countPage = CountPage;
}
public void setNextImg(String nextImg) {
this.nextImg = nextImg;
}
public void setPreImg(String preImg) {
this.preImg = preImg;
}
public void setIsJump(String isJump) {
this.isJump = isJump;
}
public String getComponentType() {
return ("Scroller");
}
public String getRendererType() {
return (null);
}
public void release() {
super.release();
this.navFacetOrientation = null;
}
protected void setProperties(UIComponent component) {
super.setProperties(component);
FacesContext context = FacesContext.getCurrentInstance();
ValueBinding vb = null;
if (actionListener != null) {
if (isValueReference(actionListener)) {
Class args[] = {ActionEvent.class};
MethodBinding mb = FacesContext.getCurrentInstance()
.getApplication()
.createMethodBinding(actionListener, args);
((ScrollerComponent) component).setActionListener(mb);
} else {
Object params[] = {actionListener};
throw new javax.faces.FacesException();
}
}
// if the attributes are values set them directly on the component, if
// not set the ValueBinding reference so that the expressions can be
// evaluated lazily.
if (navFacetOrientation != null) {
if (isValueReference(navFacetOrientation)) {
vb =
context.getApplication().createValueBinding(
navFacetOrientation);
component.setValueBinding("navFacetOrientation", vb);
} else {
component.getAttributes().put("navFacetOrientation",
navFacetOrientation);
}
}
if (pageSize != null) {
if (isValueReference(pageSize)) {
vb = context.getApplication().createValueBinding(pageSize);
component.setValueBinding("pageSize", vb);
} else {
component.getAttributes().put("pageSize", pageSize);
}
}
if (isJump != null) {
if (isValueReference(isJump)) {
vb = context.getApplication().createValueBinding(isJump);
component.setValueBinding("isJump", vb);
} else {
component.getAttributes().put("isJump", isJump);
}
}
if (preImg != null) {
if (isValueReference(preImg)) {
vb = context.getApplication().createValueBinding(preImg);
component.setValueBinding("preImg", vb);
} else {
component.getAttributes().put("preImg", preImg);
}
}
if (nextImg != null) {
if (isValueReference(nextImg)) {
vb = context.getApplication().createValueBinding(nextImg);
component.setValueBinding("nextImg", vb);
} else {
component.getAttributes().put("nextImg", nextImg);
}
}
if (countPage != null) {
if (isValueReference(countPage)) {
vb = context.getApplication().createValueBinding(countPage);
component.setValueBinding("countPage", vb);
} else {
component.getAttributes().put("countPage", countPage);
}
}
if (totalPageCount != null) {
if (isValueReference(totalPageCount)) {
vb = context.getApplication().createValueBinding(totalPageCount);
component.setValueBinding("totalPageCount", vb);
} else {
component.getAttributes().put("totalPageCount", totalPageCount);
}
}
if (totalCount != null) {
if (isValueReference(totalCount)) {
vb = context.getApplication().createValueBinding(totalCount);
component.setValueBinding("totalCount", vb);
} else {
component.getAttributes().put("totalCount", totalCount);
}
}
if (style != null) {
if (isValueReference(style)) {
vb = context.getApplication().createValueBinding(style);
component.setValueBinding("style", vb);
} else {
component.getAttributes().put("style", style);
}
}
if (styleClass != null) {
if (isValueReference(styleClass)) {
vb = context.getApplication().createValueBinding(styleClass);
component.setValueBinding("styleClass", vb);
} else {
component.getAttributes().put("styleClass", styleClass);
}
}
if (styleClass != null) {
if (isValueReference(styleClass)) {
vb = context.getApplication().createValueBinding(styleClass);
component.setValueBinding("styleClass", vb);
} else {
component.getAttributes().put("styleClass", styleClass);
}
}
if (paramList != null) {
if (isValueReference(paramList)) {
vb = context.getApplication().createValueBinding(paramList);
component.setValueBinding("paramList", vb);
} else {
component.getAttributes().put("paramList", paramList);
}
}
}
public String getTotalCount() {
return totalCount;
}
public String getCountPage() {
return countPage;
}
public String getNextImg() {
return nextImg;
}
public String getPreImg() {
return preImg;
}
public String getIsJump() {
return isJump;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -