1 13 package com.tonbeller.wcf.catedit; 14 15 import javax.servlet.jsp.JspException ; 16 17 import com.tonbeller.wcf.component.Component; 18 import com.tonbeller.wcf.component.ComponentTag; 19 import com.tonbeller.wcf.controller.RequestContext; 20 21 26 public class CategoryEditorTag extends ComponentTag { 27 String model; 28 29 32 public Component createComponent(RequestContext context) throws JspException { 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 45 public String getModel() { 46 return model; 47 } 48 49 53 public void setModel(String model) { 54 this.model = model; 55 } 56 57 } 58 | Popular Tags |