All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.sun.facelets.compiler.EncodingHandler Maven / Gradle / Ivy

Go to download

Facelets is an open source alternative view handler technology for JavaServer Faces (JSF).

The newest version!
package com.sun.facelets.compiler;

import java.io.IOException;

import javax.el.ELException;
import javax.faces.FacesException;
import javax.faces.component.UIComponent;

import com.sun.facelets.FaceletContext;
import com.sun.facelets.FaceletException;
import com.sun.facelets.FaceletHandler;

public class EncodingHandler implements FaceletHandler {

    private final FaceletHandler next;
    private final String encoding;
    
    public EncodingHandler(FaceletHandler next, String encoding) {
        this.next = next;
        this.encoding = encoding;
    }

    public void apply(FaceletContext ctx, UIComponent parent)
            throws IOException, FacesException, FaceletException, ELException {
        this.next.apply(ctx, parent);
        ctx.getFacesContext().getExternalContext().getRequestMap().put("facelets.Encoding", this.encoding);
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy