1 14 15 package com.sun.facelets.compiler; 16 17 import java.io.IOException ; 18 import java.util.List ; 19 20 import javax.el.ELContext; 21 import javax.el.ExpressionFactory; 22 23 import javax.faces.context.FacesContext; 24 import javax.faces.context.ResponseWriter; 25 26 27 final class LiteralAttributeInstruction implements Instruction { 28 private final String attr; 29 30 private final String text; 31 32 public LiteralAttributeInstruction(String attr, String text) { 33 this.attr = attr; 34 this.text = text; 35 } 36 37 public void write(FacesContext context) throws IOException { 38 context.getResponseWriter().writeAttribute(this.attr, this.text, null); 39 } 40 41 public Instruction apply(ExpressionFactory factory, ELContext ctx) { 42 return this; 43 } 44 45 public boolean isLiteral() { 46 return true; 47 } 48 } 49 | Popular Tags |