KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > tonbeller > wcf > catedit > CategoryEditorTag


1 /*
2  * ====================================================================
3  * This software is subject to the terms of the Common Public License
4  * Agreement, available at the following URL:
5  * http://www.opensource.org/licenses/cpl.html .
6  * Copyright (C) 2003-2004 TONBELLER AG.
7  * All Rights Reserved.
8  * You must accept the terms of that agreement to use this software.
9  * ====================================================================
10  *
11  *
12  */

13 package com.tonbeller.wcf.catedit;
14
15 import javax.servlet.jsp.JspException JavaDoc;
16
17 import com.tonbeller.wcf.component.Component;
18 import com.tonbeller.wcf.component.ComponentTag;
19 import com.tonbeller.wcf.controller.RequestContext;
20
21 /**
22  * Created on 20.12.2002
23  *
24  * @author av
25  */

26 public class CategoryEditorTag extends ComponentTag {
27   String JavaDoc model;
28
29   /**
30    * @see com.tonbeller.wcf.tags.ComponentTag#createComponent()
31    */

32   public Component createComponent(RequestContext context) throws JspException JavaDoc {
33     CategoryModel cm;
34     if (model != null)
35       cm = (CategoryModel) context.getModelReference(getModel());
36     else
37       cm = new TestCategoryModel();
38     return new CategoryEditor(getId(), null, cm);
39   }
40
41   /**
42    * Returns the model.
43    * @return String
44    */

45   public String JavaDoc getModel() {
46     return model;
47   }
48
49   /**
50    * Sets the model.
51    * @param model The model to set
52    */

53   public void setModel(String JavaDoc model) {
54     this.model = model;
55   }
56
57 }
58
Popular Tags