View Javadoc

1   /*
2    * Licensed to the Apache Software Foundation (ASF) under one
3    * or more contributor license agreements.  See the NOTICE file
4    * distributed with this work for additional information
5    * regarding copyright ownership.  The ASF licenses this file
6    * to you under the Apache License, Version 2.0 (the
7    * "License"); you may not use this file except in compliance
8    * with the License.  You may obtain a copy of the License at
9    *
10   *   http://www.apache.org/licenses/LICENSE-2.0
11   *
12   * Unless required by applicable law or agreed to in writing,
13   * software distributed under the License is distributed on an
14   * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15   * KIND, either express or implied.  See the License for the
16   * specific language governing permissions and limitations
17   * under the License.
18   */
19  package org.apache.myfaces.view.facelets.pool;
20  
21  import java.io.Serializable;
22  import java.util.Locale;
23  import javax.annotation.PostConstruct;
24  import javax.faces.bean.ManagedBean;
25  import javax.faces.bean.SessionScoped;
26  
27  /**
28   *
29   */
30  @ManagedBean(name="dynamicBean")
31  @SessionScoped
32  public class DynamicBean implements Serializable
33  {
34      
35      private boolean panel1;
36      
37      private Locale locale;
38      
39      private String contract;
40      
41      private boolean resource1;
42      
43      public DynamicBean()
44      {
45      }
46      
47      @PostConstruct
48      public void init()
49      {
50          locale = Locale.US;
51          contract = "blue";
52      }
53  
54      /**
55       * @return the panel1
56       */
57      public boolean isPanel1()
58      {
59          return panel1;
60      }
61  
62      /**
63       * @param panel1 the panel1 to set
64       */
65      public void setPanel1(boolean panel1)
66      {
67          this.panel1 = panel1;
68      }
69  
70      /**
71       * @return the locale
72       */
73      public Locale getLocale()
74      {
75          return locale;
76      }
77  
78      /**
79       * @param locale the locale to set
80       */
81      public void setLocale(Locale locale)
82      {
83          this.locale = locale;
84      }
85  
86      /**
87       * @return the contract
88       */
89      public String getContract()
90      {
91          return contract;
92      }
93  
94      /**
95       * @param contract the contract to set
96       */
97      public void setContract(String contract)
98      {
99          this.contract = contract;
100     }
101 
102     /**
103      * @return the resource1
104      */
105     public boolean isResource1()
106     {
107         return resource1;
108     }
109 
110     /**
111      * @param resource1 the resource1 to set
112      */
113     public void setResource1(boolean resource1)
114     {
115         this.resource1 = resource1;
116     }
117     
118 }