KickJava   Java API By Example, From Geeks To Geeks.

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


1 package com.sun.facelets.compiler;
2
3 import java.io.IOException JavaDoc;
4
5 import javax.el.ELException;
6 import javax.faces.FacesException;
7 import javax.faces.component.UIComponent;
8
9 import com.sun.facelets.FaceletContext;
10 import com.sun.facelets.FaceletException;
11 import com.sun.facelets.FaceletHandler;
12
13 public class EncodingHandler implements FaceletHandler {
14
15     private final FaceletHandler next;
16     private final String JavaDoc encoding;
17     
18     public EncodingHandler(FaceletHandler next, String JavaDoc encoding) {
19         this.next = next;
20         this.encoding = encoding;
21     }
22
23     public void apply(FaceletContext ctx, UIComponent parent)
24             throws IOException JavaDoc, FacesException, FaceletException, ELException {
25         this.next.apply(ctx, parent);
26         ctx.getFacesContext().getExternalContext().getRequestMap().put("facelets.Encoding", this.encoding);
27     }
28
29 }
30
Popular Tags