package org.seasar.jsf.runtime;

import org.seasar.framework.util.ClassUtil;
import org.seasar.framework.util.StringUtil;
import org.seasar.framework.xml.TagHandler;
import org.seasar.framework.xml.TagHandlerContext;
import org.seasar.jsf.TagConfig;

/**
 * @author higa
 *
 */
public class TaglibTagClassTagHandler extends TagHandler {

	public void end(TagHandlerContext context, String body) {
		if (body != null) {
			body = body.trim();
		}
		if (!StringUtil.isEmpty(body)) {
			Class tagClass = ClassUtil.forName(body);
			TagConfig tagConfig = (TagConfig) context.peek();
			tagConfig.setTagClass(tagClass);
		}
	}
}
