1 5 package org.exoplatform.faces.core.component; 6 7 import java.io.IOException ; 8 import javax.faces.context.FacesContext; 9 import javax.faces.context.ResponseWriter; 10 11 17 public class UIHiddenInput extends UIExoComponentBase { 18 protected String name_ ; 19 protected String value_ ; 20 protected String validateErrorMessage_ ; 21 22 public UIHiddenInput(String name, String value) { 23 name_ = name ; 24 value_ = value ; 25 } 26 27 final public String getName() { return name_; } 28 final public UIHiddenInput setName(String name) { 29 name_ = name ; 30 return this ; 31 } 32 33 final public String getValue() { return value_; } 34 final public UIHiddenInput setValue(String value) { 35 value_ = value ; 36 return this ; 37 } 38 39 public String getValidateErrorMessage() { return validateErrorMessage_ ; } 40 41 42 final public void processDecodes(FacesContext context) { 43 decode(context) ; 44 } 45 46 public void encodeBegin(FacesContext context) throws IOException { 47 ResponseWriter w = context.getResponseWriter(); 48 String value = value_ ; 49 if (value == null) value = "" ; 50 w.write("<input type='hidden' name='"); w.write(name_); w.write("'"); 51 w.write(" value='"); w.write(value); w.write("'") ; 52 w.write("/>") ; 53 } 54 55 public void encodeChildren(FacesContext context) { 56 } 57 58 public void encodeEnd(FacesContext context) { 59 } 60 } 61 | Popular Tags |