1 16 package javax.faces.component; 17 18 import java.util.Iterator ; 19 20 21 25 public class UIForm 26 extends UIComponentBase 27 implements NamingContainer 28 { 29 31 private boolean _submitted; 32 33 public boolean isSubmitted() 34 { 35 return _submitted; 36 } 37 38 public void setSubmitted(boolean submitted) 39 { 40 _submitted = submitted; 41 } 42 43 public void processDecodes(javax.faces.context.FacesContext context) 44 { 45 if (context == null) throw new NullPointerException ("context"); 46 decode(context); 47 if (!isSubmitted()) return; 48 for (Iterator it = getFacetsAndChildren(); it.hasNext(); ) 49 { 50 UIComponent childOrFacet = (UIComponent)it.next(); 51 childOrFacet.processDecodes(context); 52 } 53 } 54 55 public void processValidators(javax.faces.context.FacesContext context) 56 { 57 if (context == null) throw new NullPointerException ("context"); 58 decode(context); 62 if (!isSubmitted()) return; 63 for (Iterator it = getFacetsAndChildren(); it.hasNext(); ) 64 { 65 UIComponent childOrFacet = (UIComponent)it.next(); 66 childOrFacet.processValidators(context); 67 } 68 } 69 70 public void processUpdates(javax.faces.context.FacesContext context) 71 { 72 if (context == null) throw new NullPointerException ("context"); 73 decode(context); 77 if (!isSubmitted()) return; 78 for (Iterator it = getFacetsAndChildren(); it.hasNext(); ) 79 { 80 UIComponent childOrFacet = (UIComponent)it.next(); 81 childOrFacet.processUpdates(context); 82 } 83 } 84 85 public Object saveState(javax.faces.context.FacesContext context) 86 { 87 _submitted = false; 88 return super.saveState(context); 89 } 90 91 93 public static final String COMPONENT_TYPE = "javax.faces.Form"; 94 public static final String COMPONENT_FAMILY = "javax.faces.Form"; 95 private static final String DEFAULT_RENDERER_TYPE = "javax.faces.Form"; 96 97 98 public UIForm() 99 { 100 setRendererType(DEFAULT_RENDERER_TYPE); 101 } 102 103 public String getFamily() 104 { 105 return COMPONENT_FAMILY; 106 } 107 108 109 } 111 | Popular Tags |