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

📄 htmlformtag.java

📁 Please read your package and describe it at least 40 bytes in English. System will automatically de
💻 JAVA
字号:
/* * Copyright 2002-2004 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * *      http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */package de.mindmatters.faces.taglib.jsp;import javax.faces.component.UIComponent;import org.springframework.util.Assert;import de.mindmatters.faces.component.html.HtmlForm;/** * <strong>HtmlFormTag</strong> represents the HTML jsp tag for UIComponent * {@link HtmlForm}. *  * @author Andreas Kuhrwahl *  */public class HtmlFormTag extends AbstractHtmlActionSourceComponentTag {    /** The accept attribute. */    private String accept;    /** The acceptCharset attribute. */    private String acceptCharset;    /** The enctype attribute. */    private String enctype;    /** The name attribute. */    private String name;    /** The onreset attribute. */    private String onreset;    /** The onsubmit attribute. */    private String onsubmit;    /** The target attribute. */    private String target;    /** The method attribute. */    private String method;    /** The transient attribute. */    private String isTransient;    /**     * {@inheritDoc}     */    public String getComponentType() {        return HtmlForm.COMPONENT_TYPE;    }    /**     * {@inheritDoc}     */    public String getRendererType() {        return HtmlForm.RENDERER_TYPE;    }    /**     * {@inheritDoc}     */    public void release() {        super.release();        this.accept = null;        this.acceptCharset = null;        this.enctype = null;        this.name = null;        this.onreset = null;        this.onsubmit = null;        this.target = null;        this.method = null;        this.isTransient = null;    }    /**     * {@inheritDoc}     */    protected void setProperties(final UIComponent component) {        Assert.isInstanceOf(HtmlForm.class, component);        super.setProperties(component);        setStringProperty(component, "accept", this.accept);        setStringProperty(component, "accept-charset", this.acceptCharset);        setStringProperty(component, "enctype", this.enctype);        setStringProperty(component, "name", this.name);        setStringProperty(component, "onreset", this.onreset);        setStringProperty(component, "onsubmit", this.onsubmit);        setStringProperty(component, "target", this.target);        setStringProperty(component, "method", this.method);        setBooleanProperty(component, "transient", this.isTransient);    }    /**     * {@inheritDoc}     */    protected void setActionProperty(final UIComponent component) {        if (addValueBindingIfNecessary(component, "action", getAction())) {            if (!component.getValueBinding("action").getType(getFacesContext())                    .equals(String.class)) {                throw new IllegalArgumentException(                        "Only plain string outcomes are allowed for this action attribute");            }        } else {            super.setActionProperty(component);        }    }    /**     * Returns the accept attribute value.     *      * @return The accept attribute value     */    public final String getAccept() {        return accept;    }    /**     * Sets the accept attribute value.     *      * @param accept     *            The accept attribute value     */    public final void setAccept(final String accept) {        this.accept = accept;    }    /**     * Returns the acceptCharset attribute value.     *      * @return The acceptCharset attribute value     */    public final String getAcceptCharset() {        return acceptCharset;    }    /**     * Sets the acceptCharset attribute value.     *      * @param acceptCharset     *            The acceptCharset attribute value     */    public final void setAcceptCharset(final String acceptCharset) {        this.acceptCharset = acceptCharset;    }    /**     * Returns the enctype attribute value.     *      * @return The enctype attribute value     */    public final String getEnctype() {        return enctype;    }    /**     * Sets the enctype attribute value.     *      * @param enctype     *            The enctype attribute value     */    public final void setEnctype(final String enctype) {        this.enctype = enctype;    }    /**     * Returns the name attribute value.     *      * @return The name attribute value     */    public final String getName() {        return name;    }    /**     * Sets the name attribute value.     *      * @param name     *            The name attribute value     */    public final void setName(final String name) {        this.name = name;    }    /**     * Returns the onreset attribute value.     *      * @return The onreset attribute value     */    public final String getOnreset() {        return onreset;    }    /**     * Sets the onreset attribute value.     *      * @param onreset     *            The onreset attribute value     */    public final void setOnreset(final String onreset) {        this.onreset = onreset;    }    /**     * Returns the onsubmit attribute value.     *      * @return The onsubmit attribute value     */    public final String getOnsubmit() {        return onsubmit;    }    /**     * Sets the onsubmit attribute value.     *      * @param onsubmit     *            The onsubmit attribute value     */    public final void setOnsubmit(final String onsubmit) {        this.onsubmit = onsubmit;    }    /**     * Returns the target attribute value.     *      * @return The target attribute value     */    public final String getTarget() {        return target;    }    /**     * Sets the target attribute value.     *      * @param target     *            The target attribute value     */    public final void setTarget(final String target) {        this.target = target;    }    /**     * Returns the method attribute value.     *      * @return The method attribute value     */    public final String getMethod() {        return method;    }    /**     * Sets the method attribute value.     *      * @param method     *            The method attribute value     * @throws IllegalArgumentException     *             if method is 'GET' and no ViewBuilder is configured     */    public final void setMethod(final String method) {        this.method = method;    }    /**     * Returns the transient attribute value.     *      * @return The transient attribute value     */    public final String getTransient() {        return isTransient;    }    /**     * Sets the transient attribute value.     *      * @param transientValue     *            the transient value     */    public final void setTransient(final String transientValue) {        this.isTransient = transientValue;    }}

⌨️ 快捷键说明

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