Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
License Agreement. Rich Faces - Natural Ajax for Java Server Faces (JSF) Copyright (C) 2007 Exadel, Inc. This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License version 2.1 as published by the Free Software Foundation. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
package org.ajax4jsf.templatecompiler.elements.html;
Factory for processing HTLM-attributes.

Author(s):
ayukhovich@exadel.com (latest modification by $Author: alexeyyukhovich $)
Version:
$Revision: 1.1.2.1 $ $Date: 2007/02/26 20:48:42 $
public class HtmlAttributesFactory {
	private final static String DEFAULT_CLASS_ATTRIBUTE_PROCESSOR = "org.ajax4jsf.templatecompiler.elements.html.attribute.HtmlAttribute";
	private final static Class[] paramClasses = new Class[] { String.class,
			String.class };
	private final static HashMap mapClasses = new HashMap();
	static {
		// mapClasses.put("x:passThruWithExclusions",
		// "org.ajax4jsf.templatecompiler.elements.html.attribute.PassThruWithExclusions");
		.put("x:otherParameters""");
	}
	public static Attribute getProcessor(String attributeName,
			String attributeValue) {
		Attribute returnValue = null;
		String className = (String.get(attributeName);
		if (className == null) {
		}
		if (!className.equals("")) {
			Class class1;
			try {
				class1 = Class.forName(className);
				try {
					try {
						Object[] objects = new Object[2];
						objects[0] = attributeName;
						objects[1] = attributeValue;
						returnValue = (Attributeclass1.getConstructor(
catch (InstantiationException e) {
catch (IllegalAccessException e) {
					}
catch (IllegalArgumentException e) {
catch (SecurityException e) {
catch (InvocationTargetException e) {
catch (NoSuchMethodException e) {
				}
catch (ClassNotFoundException e1) {
			}
		}
		return returnValue;
	}
New to GrepCode? Check out our FAQ X