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 javax.el.ELException;
28  import javax.faces.FacesException;
29  import java.util.Arrays;
30  import java.util.ArrayList;
31  import java.util.Collection;
32  import java.util.List;
33  import javax.el.MethodExpression;
34  import javax.el.ValueExpression;
35  
36  /** 
37   Update the parent component
38  
39    ********************* <br/>
40    WARNING <br/>
41    ********************* <br/>
42    This feature is preliminary and may be subject of change in later versions!  <br/>
43    * UIComponent class, generated from template {@code component.stg} with class
44    * {@link org.apache.myfaces.tobago.internal.taglib.component.ReloadTagDeclaration}.
45   */
46  public class UIReload
47      extends UIComponentBase  {
48  
49    public static final String COMPONENT_TYPE = "org.apache.myfaces.tobago.Reload";
50  
51    public static final String COMPONENT_FAMILY = "org.apache.myfaces.tobago.Reload";
52  
53  
54    enum PropertyKeys {
55      immediate,
56      update,
57      frequency,
58    }
59  
60    public String getFamily() {
61      return COMPONENT_FAMILY;
62    }
63  
64  
65    /**
66    Flag indicating that
67     the update check should be performed
68     immediately (that is, during Apply Request Values phase) rather than
69     waiting until Render Response phase.
70    <br>Default: <code>true</code>
71    */
72    public boolean isImmediate() {
73      Boolean bool = (Boolean) getStateHelper().eval(PropertyKeys.immediate);
74      if (bool != null) {
75        return bool;
76      }
77      return true;
78    }
79  
80    public void setImmediate(boolean immediate) {
81      getStateHelper().put(PropertyKeys.immediate, immediate);
82    }
83  
84    /**
85    Is update required.
86    <br>Default: <code>true</code>
87    */
88    public boolean isUpdate() {
89      Boolean bool = (Boolean) getStateHelper().eval(PropertyKeys.update);
90      if (bool != null) {
91        return bool;
92      }
93      return true;
94    }
95  
96    public void setUpdate(boolean update) {
97      getStateHelper().put(PropertyKeys.update, update);
98    }
99  
100   /**
101   Time in milliseconds after which the parent component is automatically reloaded.
102   <br>Default: <code>5000</code>
103   */
104   public java.lang.Integer getFrequency() {
105     Number value  = (Number) getStateHelper().eval(PropertyKeys.frequency);
106     if (value != null) {
107       return value.intValue();
108     }
109     return 5000;
110   }
111 
112   public void setFrequency(java.lang.Integer frequency) {
113     getStateHelper().put(PropertyKeys.frequency, frequency);
114   }
115 
116 
117 }