package org.seasar.jsf.runtime;

import org.seasar.framework.xml.TagHandler;
import org.seasar.framework.xml.TagHandlerContext;
import org.seasar.jsf.TagConfig;
import org.seasar.jsf.TaglibConfig;
import org.xml.sax.Attributes;

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

	/**
	 * @see org.seasar.framework.xml.sax.handler.TagHandler#start(org.seasar.framework.xml.sax.handler.TagHandlerContext, org.xml.sax.Attributes)
	 */
	public void start(TagHandlerContext context, Attributes attributes) {
		TagConfig tagConfig = new TagConfigImpl();
		context.push(tagConfig);
	}

	/**
	 * @see org.seasar.framework.xml.sax.handler.TagHandler#end(org.seasar.framework.xml.sax.handler.TagHandlerContext, java.lang.String)
	 */
	public void end(TagHandlerContext context, String body) {
		TagConfig tagConfig = (TagConfig) context.pop();
		TaglibConfig taglibConfig = (TaglibConfig) context.peek();
		taglibConfig.addTagConfig(tagConfig);
		
	}

}
