All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.ajax4jsf.taglib.ajax.AjaxStatusTag Maven / Gradle / Ivy

Go to download

Ajax4jsf is an open source extension to the JavaServer Faces standard that adds AJAX capability to JSF applications without requiring the writing of any JavaScript.

The newest version!
/**
 * Copyright 2004 The Apache Software Foundation.
 *
 * 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 org.ajax4jsf.taglib.ajax;

import javax.faces.component.UIComponent;

import org.ajax4jsf.ajax.UIAjaxStatus;
import org.ajax4jsf.framework.taglib.HtmlComponentTagBase;
import org.ajax4jsf.renderers.ajax.AjaxStatusRenderer;


/**
 * 
 * Jsp Tag for create request state component.
 * @author shura (latest modification by $Author: sergeysmirnov $)
 * @version $Revision: 1.1 $ $Date: 2006/04/28 02:05:49 $
 *
 */
public class AjaxStatusTag extends HtmlComponentTagBase
{

    private String _for = null;
    /**
     * Text to output on start request
     */
    private String _startText = null;
    /**
     * Text to display on complete request
     */
    private String _stopText = null;

    /**
     * Style for display on start request
     */
    private String _startStyle = null;
    /**
     * Style for displaying on complete
     */
    private String _stopStyle = null;
    /**
     * Style class for display on request
     */
    private String _startStyleClass = null;
    /**
     * Style class for display on complete request
     */
    private String _stopStyleClass = null;
    
    /**
     * Force id to render in Html as is
     */
    private String _forceId = null;
    /* (non-Javadoc)
     * @see javax.faces.webapp.UIComponentTag#getComponentType()
     */
    public String getComponentType()
    {
        // TODO Auto-generated method stub
        return UIAjaxStatus.COMPONENT_TYPE;
    }

    /* (non-Javadoc)
     * @see javax.faces.webapp.UIComponentTag#getRendererType()
     */
    public String getRendererType()
    {
        // TODO Auto-generated method stub
        return AjaxStatusRenderer.RENDERER_TYPE;
    }

    /* (non-Javadoc)
     * @see org.ajax4jsf.components.taglib.html.HtmlComponentTagBase#release()
     */
    public void release()
    {
        super.release();
        this._for = null;
        this._startStyle = null;
        this._startStyleClass = null;
        this._startText = null;
        this._stopStyle = null;
        this._stopStyleClass = null;
        this._stopText = null;
        this._forceId = null;
        
    }

    /* (non-Javadoc)
     * @see org.ajax4jsf.components.taglib.html.HtmlComponentTagBase#setProperties(javax.faces.component.UIComponent)
     */
    protected void setProperties(UIComponent component)
    {
        super.setProperties(component);
        setStringProperty(component, "for", _for);
        setStringProperty(component, "startText", _startText);
        setStringProperty(component, "stopText", _stopText);
        setStringProperty(component, "startStyle", _startStyle);
        setStringProperty(component, "stopStyle", _stopStyle);
        setStringProperty(component, "startStyleClass", _startStyleClass);
        setStringProperty(component, "stopStyleClass", _stopStyleClass);
        setBooleanProperty(component, "forceId", _forceId);
        
    }

    
    /**
     * @param _for The _for to set.
     */
    public void setFor(String _for)
    {
        this._for = _for;
    }

    /**
     * @param style The _startStyle to set.
     */
    public void setStartStyle(String style)
    {
        _startStyle = style;
    }

    /**
     * @param styleClass The _startStyleClass to set.
     */
    public void setStartStyleClass(String styleClass)
    {
        _startStyleClass = styleClass;
    }

    /**
     * @param text The _startText to set.
     */
    public void setStartText(String text)
    {
        _startText = text;
    }

    /**
     * @param stopText The stopText to set.
     */
    public void setStopText(String stopText)
    {
        this._stopText = stopText;
    }

    /**
     * @param style The _stopStyle to set.
     */
    public void setStopStyle(String style)
    {
        _stopStyle = style;
    }

    /**
     * @param styleClass The _stopStyleClass to set.
     */
    public void setStopStyleClass(String styleClass)
    {
        _stopStyleClass = styleClass;
    }

    /**
     * @param forceId The forceId to set.
     */
    public void setForceId(String forceId)
    {
        this._forceId = forceId;
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy