001 package railo.runtime.tag; 002 003 import javax.servlet.jsp.tagext.Tag; 004 005 import railo.runtime.exp.TagNotSupported; 006 import railo.runtime.ext.tag.TagImpl; 007 import railo.runtime.type.List; 008 009 /** 010 * Lets you define a cfgrid that does not use a query as source for row data. If a query attribute is 011 * specified in cfgrid, the cfgridrow tags are ignored. 012 * 013 * 014 * 015 **/ 016 public final class GridRow extends TagImpl { 017 018 019 public GridRow() throws TagNotSupported { 020 throw new TagNotSupported("GridRow"); 021 } 022 023 /** A comma-separated list of column values. If a column value contains a comma character, 024 ** it must be escaped with a second comma character. */ 025 private String[] data; 026 027 /** 028 * @see javax.servlet.jsp.tagext.Tag#release() 029 */ 030 public void release() { 031 super.release(); 032 data=null; 033 } 034 035 /** set the value data 036 * A comma-separated list of column values. If a column value contains a comma character, 037 * it must be escaped with a second comma character. 038 * @param data value to set 039 **/ 040 public void setData(String data) { 041 this.data=List.listToStringArray(data, ','); 042 } 043 044 045 /** 046 * @see javax.servlet.jsp.tagext.Tag#doStartTag() 047 */ 048 public int doStartTag() { 049 // provide to parent 050 Tag parent=this; 051 do{ 052 parent = parent.getParent(); 053 if(parent instanceof Grid) { 054 ((Grid)parent).addRow(data); 055 break; 056 } 057 } 058 while(parent!=null); 059 060 return SKIP_BODY; 061 } 062 063 /** 064 * @see javax.servlet.jsp.tagext.Tag#doEndTag() 065 */ 066 public int doEndTag() { 067 return EVAL_PAGE; 068 } 069 070 }