01: /**
02: * Licensed under the Common Development and Distribution License,
03: * you may not use this file except in compliance with the License.
04: * You may obtain a copy of the License at
05: *
06: * http://www.sun.com/cddl/
07: *
08: * Unless required by applicable law or agreed to in writing, software
09: * distributed under the License is distributed on an "AS IS" BASIS,
10: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
11: * implied. See the License for the specific language governing
12: * permissions and limitations under the License.
13: */package com.sun.facelets.tag.ui;
14:
15: import java.io.IOException;
16:
17: import javax.el.ELException;
18: import javax.faces.FacesException;
19: import javax.faces.component.UIComponent;
20:
21: import com.sun.facelets.FaceletContext;
22: import com.sun.facelets.FaceletException;
23: import com.sun.facelets.tag.TagAttribute;
24: import com.sun.facelets.tag.TagAttributeException;
25: import com.sun.facelets.tag.TagConfig;
26: import com.sun.facelets.tag.TagHandler;
27:
28: /**
29: * @author Jacob Hookom
30: * @version $Id: DefineHandler.java,v 1.4 2007/05/06 17:35:04 jhook Exp $
31: */
32: public final class DefineHandler extends TagHandler {
33:
34: private final String name;
35:
36: /**
37: * @param config
38: */
39: public DefineHandler(TagConfig config) {
40: super (config);
41: TagAttribute attr = this .getRequiredAttribute("name");
42: if (!attr.isLiteral()) {
43: throw new TagAttributeException(this .tag, attr,
44: "Must be Literal");
45: }
46: this .name = attr.getValue();
47: }
48:
49: /*
50: * (non-Javadoc)
51: *
52: * @see com.sun.facelets.FaceletHandler#apply(com.sun.facelets.FaceletContext,
53: * javax.faces.component.UIComponent)
54: */
55: public void apply(FaceletContext ctx, UIComponent parent)
56: throws IOException, FacesException, FaceletException,
57: ELException {
58: // no-op
59: //this.nextHandler.apply(ctx, parent);
60: }
61:
62: public void applyDefinition(FaceletContext ctx, UIComponent parent)
63: throws IOException, FacesException, FaceletException,
64: ELException {
65: this .nextHandler.apply(ctx, parent);
66: }
67:
68: public String getName() {
69: return this.name;
70: }
71: }
|