1 7 package com.inversoft.verge.mvc.view.jsp.model; 8 9 10 import javax.servlet.jsp.JspException ; 11 12 import com.inversoft.verge.mvc.model.ModelResolution; 13 14 15 24 public class TextTag extends com.inversoft.verge.mvc.view.jsp.html.TextTag { 25 26 protected ModelResolution modelResolution; 27 28 29 34 public void initialize() throws JspException { 35 36 super.initialize(); 38 super.initializeKeyProperty(); 39 40 modelResolution = ModelHelper.getModelResolution(key, property, pageContext); 41 if (modelResolution == null) { 42 throw new JspException ("Invalid model definition: " + getModel()); 43 } 44 } 45 46 57 protected void createTextTag(StringBuffer buf, String id, String name, 58 Object value) 59 throws JspException { 60 if (isGetValue()) { 61 value = ModelHelper.getValue(modelResolution, pageContext); 62 } 63 64 super.createTextTag(buf, id, name, value); 65 } 66 67 72 public int doEndTag() throws JspException { 73 super.doEndTag(); 74 if (isSetValue()) { 75 ModelHelper.outputModelExtra(modelResolution.getMetaData(), localName, 76 pageContext); 77 } 78 79 return EVAL_PAGE; 80 } 81 } | Popular Tags |