KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > jdon > model > ModelSelector


1 /**
2  * Copyright 2003-2006 the original author or authors.
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at
6
7        http://www.apache.org/licenses/LICENSE-2.0
8
9   * Unless required by applicable law or agreed to in writing, software
10   * distributed under the License is distributed on an "AS IS" BASIS,
11   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12   * See the License for the specific language governing permissions and
13   * limitations under the License.
14   */

15
16 package com.jdon.model;
17
18 import java.util.Collection JavaDoc;
19
20 import com.jdon.controller.model.Model;
21
22 /**
23  * 本类é…?å?ˆhtml:select å’Œhtml:options使用
24  *
25  * 例如:
26  * <html:optionsCollection name="modelSelector" property="modelList" value="catId" label="name"/>
27  *
28  * @author banq
29  */

30 public class ModelSelector extends Model {
31   //选中的Model的关键字
32
private String JavaDoc keySelected = null;
33
34   //节点的关键字
35
private Collection JavaDoc modelList;
36
37   public ModelSelector(String JavaDoc keySelected, Collection JavaDoc modelList) {
38     this.keySelected = keySelected;
39     this.modelList = modelList;
40   }
41
42   public String JavaDoc getKeySelected() {
43     return keySelected;
44   }
45
46   public Collection JavaDoc getModelList() {
47     return modelList;
48   }
49
50   public void setKeySelected(String JavaDoc keySelected) {
51     this.keySelected = keySelected;
52   }
53
54   public void setModelList(Collection JavaDoc modelList) {
55     this.modelList = modelList;
56   }
57
58 }
59
Popular Tags