KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > exoplatform > portlets > weather > component > UIWeatherForm


1 /**
2  * Wed, Jun 08, 2004 @ 17:03
3  * @author: Fran�ois MORON
4  * @email: francois.moron@rd.francetelecom.com
5  **/

6
7 package org.exoplatform.portlets.weather.component;
8
9 import org.exoplatform.faces.core.component.UISimpleForm;
10 import org.exoplatform.faces.core.component.UIStringInput;
11 import org.exoplatform.faces.core.component.model.ComponentCell;
12 import org.exoplatform.faces.core.component.model.FormButton;
13 import org.exoplatform.faces.core.component.model.LabelCell;
14 import org.exoplatform.faces.core.component.model.ListComponentCell;
15 import org.exoplatform.faces.core.component.model.Row;
16
17 public class UIWeatherForm extends UISimpleForm
18 {
19     private UIStringInput uiSearchStationCode_;
20     private UIStringInput uiSearchStationName_;
21
22     public UIWeatherForm() {
23         super("weatherForm", "post", null);
24         setId("UIWeatherForm");
25         
26         uiSearchStationCode_ = new UIStringInput("code","");
27         uiSearchStationName_ = new UIStringInput("ville","");
28         
29         add(new Row().
30             add(new LabelCell("Code : ")).
31            add(new ComponentCell(this, uiSearchStationCode_)));
32         add(new Row().
33            add(new LabelCell("Ville : ")).
34            add(new ComponentCell(this, uiSearchStationName_)));
35         
36         add(new Row().
37                add(new ListComponentCell().
38                add(new FormButton("Search","WeatherFormSearch")).
39                 addColspan("2").addAlign("center")));
40     }
41
42     public String JavaDoc getSearchStationCode() {
43         return uiSearchStationCode_.getValue();
44     }
45
46     public String JavaDoc getSearchStationName() {
47         return uiSearchStationName_.getValue();
48     }
49
50     public void setSearchStationCode(String JavaDoc pSearchStationCode) {
51         uiSearchStationCode_.setValue(pSearchStationCode);
52     }
53
54     public void setSearchStationName(String JavaDoc pSearchStationName) {
55         uiSearchStationName_.setValue(pSearchStationName);
56     }
57 }
Popular Tags