001    package railo.runtime.tag;
002    
003    import javax.servlet.jsp.JspException;
004    import javax.servlet.jsp.tagext.Tag;
005    
006    import railo.runtime.ext.tag.TagImpl;
007    
008    public final class Chartdata extends TagImpl {
009    
010            private ChartDataBean data=new ChartDataBean();
011            
012            /**
013             *
014             * @see railo.runtime.ext.tag.TagImpl#release()
015             */
016            public void release() {
017                    super.release();
018                    data=new ChartDataBean();
019            }
020            
021            /**
022             * @param item the item to set
023             */
024            public void setItem(String item) {
025                    data.setItem(item);
026            }
027            
028            /**
029             * @param value the value to set
030             */
031            public void setValue(double value) {
032                    data.setValue(value);
033            }
034    
035            /**
036             *
037             * @see railo.runtime.ext.tag.TagImpl#doStartTag()
038             */
039            public int doStartTag() throws JspException {
040    
041                    //print.out("do start tag");
042                    Tag parent=this;
043                    do{
044                            parent = parent.getParent();
045                            if(parent instanceof Chartseries) {
046                                    ((Chartseries)parent).addChartData(data);
047                                    break;
048                            }
049                    }
050                    while(parent!=null);
051                    return SKIP_BODY;
052            }
053    }