1 21 22 package org.opensubsystems.core.www; 23 24 import java.util.Collection ; 25 26 import javax.servlet.jsp.JspException ; 27 import javax.servlet.jsp.tagext.TagSupport ; 28 29 import org.opensubsystems.core.util.DataObjectUtils; 30 31 40 public class IdListTag extends TagSupport 41 { 42 44 47 private static final long serialVersionUID = 6752629609523601805L; 48 49 53 protected String m_strName; 54 55 57 60 public IdListTag() 61 { 62 super(); 63 64 m_strName = ""; 65 } 66 67 69 72 public int doStartTag( 73 ) throws JspException 74 { 75 Collection colItems; 76 77 colItems = (Collection )pageContext.getRequest().getAttribute(m_strName); 78 if ((colItems != null) && (!colItems.isEmpty())) 79 { 80 TagUtils.write(pageContext, 81 DataObjectUtils.parseCollectionIdsToString(colItems, ",")); 82 } 83 return (SKIP_BODY); 84 } 85 86 89 public int doEndTag( 90 ) throws JspException 91 { 92 return (EVAL_PAGE); 93 } 94 95 100 public String getName() 101 { 102 return m_strName; 103 } 104 105 110 public void setName( 111 String strName 112 ) 113 { 114 m_strName = strName; 115 } 116 } 117 | Popular Tags |