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 21 public class SelectTag extends com.inversoft.verge.mvc.view.jsp.html.SelectTag { 22 23 protected ModelResolution modelResolution; 24 25 26 31 public void initialize() throws JspException { 32 33 super.initialize(); 35 super.initializeKeyProperty(); 36 37 modelResolution = ModelHelper.getModelResolution(key, property, pageContext); 38 if (modelResolution == null) { 39 throw new JspException ("Invalid model definition: " + getModel()); 40 } 41 42 if (isGetValue()) { 46 Object value = ModelHelper.getValue(modelResolution, pageContext); 47 if (value != null) { 48 localValue = value; 49 } 50 } 51 } 52 53 58 public int doEndTag() throws JspException { 59 super.doEndTag(); 60 if (isSetValue()) { 61 ModelHelper.outputModelExtra(modelResolution.getMetaData(), localName, 62 pageContext); 63 } 64 65 return EVAL_PAGE; 66 } 67 } | Popular Tags |