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

org.ajax4jsf.framework.ajax.AjaxContainerBase 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!
/**
 * Licensed under the Common Development and Distribution License,
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * 
 *   http://www.sun.com/cddl/
 *   
 * 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.framework.ajax;

import java.util.Collection;
import java.util.Set;

import javax.faces.el.MethodBinding;

/**
  * Base interface for controller component, managed AJAX Requests.
 * Component, implemented this interface, must always return true for
 * javax.faces.component.UIComponent#getRendersChildren() method.
 * in common, set of components, rendered of current request, maintain by it.
 * TODO - add capabilites for components, rendered in PhaseListener  
 * @author shura (latest modification by $Author: alexsmirnov $)
 * @version $Revision: 1.4 $ $Date: 2006/09/25 19:21:03 $
 *
 */
public interface AjaxContainerBase {
    /**
     * getter for AjaxListener method. Same as for ActionSource
     * 
     * @see javax.faces.component.ActionSource#getActionListener()
     */
    public MethodBinding getAjaxListener();

    /**
     * setter for AjaxListener MethodBinding
     * in case on AjaxRequest, component must call this method in 
     * PhaseId.APPLY_REQUEST_VALUES or
     * PhaseId.INVOKE_APPLICATION phases, depend on immediate flag.
     * 
     * @see javax.faces.component.ActionSource#setActionListener(javax.faces.el.MethodBinding)
     */
    public void setAjaxListener(MethodBinding AjaxListener);

    /**
     * getter for flag immediate call Listener's on PhaseId.APPLY_REQUEST_VALUES phase.
     * 
     * @see javax.faces.component.ActionSource#isImmediate()
     */
    public boolean isImmediate();

    /**
     * getter for render method flag of subview. If true, on AJAX-request component render it children
     * after {@link com.sun.faces.lifecycle.Phase.INVOKE_APPLICATION } 
     * @return value of selfRendered flag
     */
    public boolean isSelfRendered();
    
    /**
     * setter for self-render flag.
     * @param selfRendered
     */
    public void setSelfRendered(boolean selfRendered);
    /**
     * setter for immediate flag.
     * 
     * @see javax.faces.component.ActionSource#setImmediate(boolean)
     */
    public void setImmediate(boolean immediate);

    /**
     * Append ID of component for render in current request to ajaxAreas.
     * component don't store list of this id's - since it can be different from request to request.
     */
    public void addAjaxArea(String toRender);

    /**
     * @param collection of ID's components for render in current request
     * component don't store list of this id's - since it can be different from request to request.
     */
    public void addAjaxAreas(Collection collection);

    /**
     * @return Returns the indication of ajaxRequest.
     */
    public boolean isAjaxRequest();

    /**
     * @param ajaxRequest - set the type of processing request.
     * false - normal JSF, true - AJAX           
     */
    public void setAjaxRequest(boolean ajaxRequest);
    
    public boolean isSubmitted();
    
    public void setSubmitted(boolean submitted);

    /**
     * @return Returns the List of components Id's, actually
     * rendered on current request.
     */
    public Set getAjaxRenderedAreas();


	public Set getAjaxAreasToRender();
	
	/**
	 * Render AJAX response for this container from stored View.
	 * @param context
	 * @throws FacesException
	 */
//	public void renderAjaxRegion(FacesContext context) throws FacesException ;

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy