View Javadoc

1   // ---------- Attention: Generated code, please do not modify! -----------  
2   
3   /*
4    * Licensed to the Apache Software Foundation (ASF) under one or more
5    * contributor license agreements.  See the NOTICE file distributed with
6    * this work for additional information regarding copyright ownership.
7    * The ASF licenses this file to You under the Apache License, Version 2.0
8    * (the "License"); you may not use this file except in compliance with
9    * the License.  You may obtain a copy of the License at
10   *
11   *      http://www.apache.org/licenses/LICENSE-2.0
12   *
13   * Unless required by applicable law or agreed to in writing, software
14   * distributed under the License is distributed on an "AS IS" BASIS,
15   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16   * See the License for the specific language governing permissions and
17   * limitations under the License.
18   */
19  
20  package org.apache.myfaces.tobago.component;
21  
22  import javax.faces.component.UIComponentBase;
23  import javax.faces.context.FacesContext;
24  import org.apache.myfaces.tobago.internal.util.ArrayUtils;
25  import org.apache.myfaces.tobago.internal.util.StringUtils;
26  import org.apache.myfaces.tobago.internal.util.Deprecation;
27  import org.apache.myfaces.tobago.renderkit.MarginValues;
28  import org.apache.myfaces.tobago.renderkit.SpacingValues;
29  import org.apache.myfaces.tobago.renderkit.LayoutComponentRenderer;
30  import javax.el.ELException;
31  import javax.faces.FacesException;
32  import java.util.ArrayList;
33  import java.util.List;
34  import javax.el.MethodExpression;
35  import javax.el.ValueExpression;
36  
37  /** 
38   Update the parent component
39    * UIComponent class, generated from template {@code component2.0.stg} with class
40    * {@link org.apache.myfaces.tobago.internal.taglib.component.ReloadTagDeclaration}.
41   */
42  public class UIReload
43      extends UIComponentBase  {
44  
45    public static final String COMPONENT_TYPE = "org.apache.myfaces.tobago.Reload";
46  
47    public static final String COMPONENT_FAMILY = "org.apache.myfaces.tobago.Reload";
48  
49  
50    enum PropertyKeys {
51      update,
52      immediate,
53      frequency,
54    }
55  
56    public String getFamily() {
57      return COMPONENT_FAMILY;
58    }
59  
60  
61    /**
62    Is update required.
63    <br />Default: <code>true</code>
64    */
65    public boolean isUpdate() {
66      Boolean bool = (Boolean) getStateHelper().eval(PropertyKeys.update);
67      if (bool != null) {
68        return bool;
69      }
70      return true;
71    }
72  
73    public void setUpdate(boolean update) {
74      getStateHelper().put(PropertyKeys.update, update);
75    }
76  
77    /**
78    Flag indicating that
79     the update check should be performed
80     immediately (that is, during Apply Request Values phase) rather than
81     waiting until Render Response phase.
82    <br />Default: <code>true</code>
83    */
84    public boolean isImmediate() {
85      Boolean bool = (Boolean) getStateHelper().eval(PropertyKeys.immediate);
86      if (bool != null) {
87        return bool;
88      }
89      return true;
90    }
91  
92    public void setImmediate(boolean immediate) {
93      getStateHelper().put(PropertyKeys.immediate, immediate);
94    }
95  
96    /**
97    Time in milliseconds after which the parent component is automatically reloaded.
98    <br />Default: <code>5000</code>
99    */
100   public java.lang.Integer getFrequency() {
101     Number value  = (Number) getStateHelper().eval(PropertyKeys.frequency);
102     if (value != null) {
103       return value.intValue();
104     }
105     return 5000;
106   }
107 
108   public void setFrequency(java.lang.Integer frequency) {
109     getStateHelper().put(PropertyKeys.frequency, frequency);
110   }
111 
112 
113 
114 }