Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

Source code: org/apache/myfaces/examples/inputsuggest/StateInfo.java


1   /*
2    * Copyright 2005 The Apache Software Foundation.
3    *
4    * Licensed under the Apache License, Version 2.0 (the "License");
5    * you may not use this file except in compliance with the License.
6    * You may obtain a copy of the License at
7    *
8    *      http://www.apache.org/licenses/LICENSE-2.0
9    *
10   * Unless required by applicable law or agreed to in writing, software
11   * distributed under the License is distributed on an "AS IS" BASIS,
12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   * See the License for the specific language governing permissions and
14   * limitations under the License.
15   */
16  package org.apache.myfaces.examples.inputsuggest;
17  
18  /**
19   * This class is basically designed to simulate an application-specific bean that might exist in some
20   * application.  The point here is to demonstrate how an application-specific bean such as this can
21   * be integrated into inputSuggest.  The JSP page and the inputSuggest component know nothing about
22   * StateInfo or {@link User}.  The {@link UserHandler} backing bean and the value binding expression in
23   * the JSP help bridge this gap.
24   *
25   * @author Sean Schofield
26   * @version $Revision: $ $Date: $
27   */
28  public class StateInfo {
29      private String key;
30      private String text;
31  
32      public StateInfo(String key, String text) {
33          this.key = key;
34          this.text = text;
35      }
36  
37      public String getKey() {
38          return key;
39      }
40  
41      public void setKey(String key) {
42          this.key = key;
43      }
44  
45      public String getText() {
46          return text;
47      }
48  
49      public void setText(String text)
50      {
51          this.text = text;
52      }
53  }