Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

Source code: com/sun/facelets/compiler/EncodingHandler.java


1   package com.sun.facelets.compiler;
2   
3   import java.io.IOException;
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 encoding;
17      
18      public EncodingHandler(FaceletHandler next, String encoding) {
19          this.next = next;
20          this.encoding = encoding;
21      }
22  
23      public void apply(FaceletContext ctx, UIComponent parent)
24              throws IOException, FacesException, FaceletException, ELException {
25          this.next.apply(ctx, parent);
26          ctx.getFacesContext().getExternalContext().getRequestMap().put("facelets.Encoding", this.encoding);
27      }
28  
29  }