⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 htmlinputdatetag.java

📁 tbuy1.1.5是在netbeans环境下用JSF技术编写的一个论坛tbuy1.1.5是在netbeans环境下用JSF技术编写的一个论坛
💻 JAVA
字号:
/* * HtmlInputDateTag.java *  * Created on 2007-9-24, 23:40:33 *  * To change this template, choose Tools | Templates * and open the template in the editor. */package biz.tbuy.common.components.test;import javax.faces.application.Application;import javax.faces.component.UIComponent;import javax.faces.context.FacesContext;import javax.faces.el.ValueBinding;import javax.faces.webapp.UIComponentTag;/** * * @author Administrator */public class HtmlInputDateTag extends UIComponentTag{    // tag properties    private String size = null;    private String value = null;    private String startyear = null;    private String endyear = null;    public HtmlInputDateTag() {        super();    }    public String getComponentType() {        return "InputDate";    }    public String getRendererType() {        return "HtmlInputDateRenderer";    }        @Override    @SuppressWarnings("deprecation")    public void setProperties(UIComponent ui) {        super.setProperties(ui);        if (size != null) {            if (isValueReference(size)) {                FacesContext fc = FacesContext.getCurrentInstance();                Application app = fc.getApplication();                ValueBinding vb = app.createValueBinding(size);                ui.setValueBinding("size", vb);            } else {                ui.getAttributes().put("size", new Integer(size));            }        }        if (value != null) {            if (isValueReference(value)) {                FacesContext fc = FacesContext.getCurrentInstance();                Application app = fc.getApplication();                ValueBinding vb = app.createValueBinding(value);                ui.setValueBinding("value", vb);            } else {                ui.getAttributes().put("value", value);            }        }        if (startyear != null) {            if (isValueReference(startyear)) {                FacesContext fc = FacesContext.getCurrentInstance();                Application app = fc.getApplication();                ValueBinding vb = app.createValueBinding(startyear);                ui.setValueBinding("startyear", vb);            } else {                ui.getAttributes().put("startyear", new Integer(startyear));            }        }        if (endyear != null) {            if (isValueReference(endyear)) {                FacesContext fc = FacesContext.getCurrentInstance();                Application app = fc.getApplication();                ValueBinding vb = app.createValueBinding(endyear);                ui.setValueBinding("endyear", vb);            } else {                ui.getAttributes().put("endyear", new Integer(endyear));            }        }    }        public void setSize(String size) {        this.size = size;    }        public void setValue(String value) {        this.value = value;    }        public void setStartyear(String startyear) {        this.startyear = startyear;    }        public void setEndyear(String endyear) {        this.endyear = endyear;    }    @Override    public void release() {        super.release();        size = null;        value = null;        startyear = null;        endyear = null;    }}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -