KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sun > facelets > compiler > UILiteralText


1 /**
2  * Licensed under the Common Development and Distribution License,
3  * you may not use this file except in compliance with the License.
4  * You may obtain a copy of the License at
5  *
6  * http://www.sun.com/cddl/
7  *
8  * Unless required by applicable law or agreed to in writing, software
9  * 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  */

14
15 package com.sun.facelets.compiler;
16
17 import java.io.IOException JavaDoc;
18
19 import javax.faces.context.FacesContext;
20 import javax.faces.context.ResponseWriter;
21
22 final class UILiteralText extends UILeaf {
23     
24     private final String JavaDoc text;
25     
26     public UILiteralText(String JavaDoc text) {
27         this.text = text;
28     }
29
30     public void encodeBegin(FacesContext faces) throws IOException JavaDoc {
31         ResponseWriter writer = faces.getResponseWriter();
32         writer.write(this.text);
33     }
34     public String JavaDoc toString() {
35         return this.text;
36     }
37
38 }
39
Popular Tags