By looking at the code I cannot see any reason why the ChartRenderer cannot
get hold of the EL bound value property. Can you put the model inside the
bean for e.g. #{bean.model} for the chartModel and #(bean.component} for the
component.

Another thing that you can try is to get the trinidad source code and debug
the
org.apache.myfaces.trinidadinternal.renderkit.core.desktop.ChartRenderer.encodeAllmethod
to see what the issue is.

Regards,
Venkata

On 11/2/07, Dan Potter <[EMAIL PROTECTED]> wrote:
>
> Yes I think my ChartModel class is fine, I can use the class with a
> tr:chart tag that is not within another tag that has bound the ChartModel
> instance to a var attribute.  It's like the chart tag can't read a var
> binding from a parent tag.  I've tried using forEach too with no luck.
>
> On 11/1/07, venkata guddanti <[EMAIL PROTECTED]> wrote:
> >
> > You could also try using af:forEach instead of af:iterator.
> >
> > Regards,
> > Venkata
> >
> > On 11/1/07, venkata guddanti < [EMAIL PROTECTED]> wrote:
> > >
> > > I am not sure I understand this issue. The value attribute for the
> > > tr:chart must be bound to a ChartModel instance. So if you did that did 
> > > you
> > > add component getter/setter inside it which is an instance of CoreChart?
> > >
> > > Regards,
> > > Venkata
> > >
> > > On 10/31/07, Dan Potter < [EMAIL PROTECTED]> wrote:
> > > >
> > > > t:dataList seemed to behave the same way.  I did a little more
> > > > experimenting and I can print out the title of the charts returned by 
> > > > the
> > > > iterator or dataList, so they aren't null.  The chart tag just thinks 
> > > > the
> > > > object is null.  I get this error.
> > > >
> > > > javax.faces.el.PropertyNotFoundException: Error setting property
> > > > 'component' in bean of type null
> > > > caused by
> > > > <tr:chart value="#{opticChart}" binding="#{opticChart.component}"
> > > >
> > > > if I take out "binding="#{opticChart.component}"" I get a null
> > > > pointer exception when it tries to call getXValues on the chart object.
> > > >
> > > > Here's the code again:
> > > > If I comment out the tr:chart tag the title of all charts in the
> > > > array are correctly displayed.  The chart tag is getting a null chart 
> > > > object
> > > > for some reason.
> > > > <t:dataList var="chart" value="#{displayBean.summaryCharts }">
> > > >
> > > > <tr:outputText value="#{chart.title}"/>
> > > >
> > > > <tr:chart value="#{chart}"
> > > > XMajorGridLineCount="6" YMajorGridLineCount="6"
> > > > inlineStyle="width:200px; height:200px; background-color:white;"
> > > > gradientsUsed="false"
> > > > legendPosition="none" perspective="false" type="verticalBar"
> > > > animationDuration="0"
> > > > rendered="true" templateSource="/styles/TrinidadChartTemplate.svg">
> > > > </tr:chart>
> > > >
> > > > </t:dataList>
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > > On 10/31/07, Andrew Robinson <[EMAIL PROTECTED] > wrote:
> > > >
> > > > > try the t:dataList and report the findings, ppl have found it to
> > > > > be less buggy.
> > > > >
> > > > > On Oct 31, 2007 12:16 PM, Dan Potter < [EMAIL PROTECTED]>
> > > > > wrote:
> > > > > > Hello,
> > > > > > I have a tr:iterator iterating over an arrayList of charts in my
> > > > > backing
> > > > > > bean.  The chart variable returned is null though, causing
> > > > > errors in the
> > > > > > tr:chart tag.  I've checked the arrayList of charts on the
> > > > > backing bean side
> > > > > > and they are not null.  Am I missing something or do charts not
> > > > > work well
> > > > > > with tr:iterator?
> > > > > > The charts in the arrayList extend
> > > > > > org.apache.myfaces.trinidad.model.ChartModel and I have been
> > > > > able to use the
> > > > > > chart tag outside of an iterator with a single chart, but I
> > > > > would like to be
> > > > > > able to iterate over a list.
> > > > > > I am using trinidad 1.0.2
> > > > > >
> > > > > > <tr:iterator var="chart" value="#{displayBean.summaryCharts}">
> > > > > >
> > > > > > <tr:chart value="#{chart}" binding="#{chart.component}"
> > > > > > XMajorGridLineCount="6" YMajorGridLineCount="6"
> > > > > > inlineStyle="width:200px; height:200px; background-color:white;"
> > > > > > gradientsUsed="false"
> > > > > > legendPosition="none" perspective="false" type="verticalBar"
> > > > > > animationDuration="0"
> > > > > > rendered="true"
> > > > > templateSource="/styles/TrinidadChartTemplate.svg">
> > > > > >  </tr:chart>
> > > > > >
> > > > > > </tr:iterator>
> > > > > >
> > > > >
> > > >
> > > >
> > >
> >
>

Reply via email to