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

org.ajax4jsf.framework.skin.SkinConfiguration 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!
/**
 * 
 */
package org.ajax4jsf.framework.skin;

import javax.faces.context.FacesContext;

/**
 * Fine tuning parameters for components configuration.
 * For any skin, calculation of concrete component parameners done by special "configuration",
 * pointed as special skin parameter ( or by default configuration ).
 * Work like "transformation" of limited set Skin parameters to fine-grained individual component
 * parameters.
 * @author shura
 *
 */
public interface SkinConfiguration {

	/**
	 * Get value for configuration parameter. If parameter set as EL-expression,
	 * calculate it value.
	 * 
	 * @param context -
	 *            {@link FacesContext } for current request.
	 * @param name
	 *            name of paremeter.
	 * @return value of parameter in config, or null
	 */
	public Object getParameter(FacesContext context, String name);
	
	/**
	 * Get value for skin parameter, for build extensible ( mandatory/fine tuning ) with three-stage checks :
	 * 
    *
  • first, check value for parameter with given name. If value not null, return it
  • *
  • second, got parameter value from skin by skinName key. If not null, return it.
  • *
  • if both above parameters is null, return default value.
  • *
* @param context - Current JSF context. * @param name - name of parameter. * @param skinName - name of according ( default ) parameter i Skin for same purpose. may be null. * @param defaultValue - default parameter value. * @return - value of parameter. */ public Object getParameter(FacesContext context, String name,String skinName, Object defaultValue); /** * Test for present parameter for given name. * @param name of parameter to test * @return true if parameter present in configuration. */ public boolean containsParameter(String name); }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy