Re: [Trinidad] [Proposal] Tree Expand All handling

2008-08-21 Thread venkata guddanti
+1.

Hard coding the bound to 100 is arbitrary and not right. This should not be
part of the framework, especially since this code effects every node
expansion/collapse.

Venkata

On Thu, Aug 21, 2008 at 2:17 PM, Kamran Kashanian [EMAIL PROTECTED]
 wrote:

 There is some code in the Trinidad UIXTree which is intended to prevent the
 user from doing an unbounded Expand All on large trees (see
 UIXTree.broadcast() method. Specifically
 HierarchyUtils.__handleBroadcast()).

 The code counts the number of newly expanded nodes and if it is  100 then
 it counts the total number of nodes in the tree and if the total is also 
 100, it prevents an expand all and only expands two levels.

 There are several issues with this:

 1) This code is executed on every expand/collapse event and can be
 expensive. Counting 100 nodes in the RowKeySet and in the tree (see
 TableUtils._getSizeOfTree()) can force the model to do additional data
 fetches beyond what is currently displayed in the view port. Also the number
 100 is completely arbitary.

 2) There is no way to for this code to know if the user did an Expand All
 or just did something to cause 100 nodes to expand. For example Expand All
 Below, or just select 100 nodes and do Expand from a menu. In these cases
 the user will get unexpcted results (only two levels will expand)

 3) Preventing the user from doing an Expand All should really be part of
 application logic and has no place in the framework. Normally the
 application would display a warning and ask the user if they really want to
 do an expand all in response to a user action


 [Proposal]

 I would like to propose that this code be removed from UIXTree. I will
 submit a patch if there are no strong objections.  This *is* a change in the
 Trinidad tree functionality, and I am not sure how it impacts current users.


 Thanks
 Kamran




Re: Apache Trinidad Chart won't load in FF/IE

2008-04-04 Thread venkata guddanti
The trinidad chart should work with FF 1.5+ with native SVG support. In IE
you would need the Adobe SVG support. It should also work with Safari 3.0+
and Opera  7.0+ browsers using the native SVG support.

If the Firefox browser asked you for download of  SVG (chart) file, it is
most likely an issue with your MIME type settings on the server. For
security reasons Firefox does not load the SVG file unless the MIME type is
set on the webserver from which the file is being server. IE totally
disregards the server MIME type setting. This explains why it is working
from the irian website.

Venkata

On Wed, Apr 2, 2008 at 2:59 AM, Mark Jason G. dela Peña 
[EMAIL PROTECTED] wrote:

 Hello everyone,

 I've been having a problem in making the tr:chart component work on
 Firefox and IE browsers. I've tried many work-arounds and discovered many
 scenarios in the attempt of fixing the problem.

 First scenario:
 Using Firefox (native SVG-support enabled), no Adobe SVG Plugin

 This is the original setup for my browser, and when I ran my web-app, the
 browser asked me to do with the SVG (chart) file, whether to download it,
 open it up with some application, etc. Of course none, of this work in
 loading the SVG chart in the web page.

 I've checked (from Firebug) that the html element (embed) being rendered
 for the SVG object includes the type attribute with the value of
 image/svg+xml, it indicated the plus sign and not the minus sign.

 I've ran the chart demo from irian.at, and the chart load just fine. Which
 I find weird.

 Second scenario:
 Using Internet Explorer with no Adobe SVG Viewer installed

 This totally does not work and asks to install for the plugin.

 Third Scenario:
 Installed Adobe SVG Viewer 3 in Internet Explorer

 Works like a charm, it rendered the SVG chart perfectly well.

 Fourth Scenario:
 Installed SVG Plugin for Mozilla Firefox, native browser support for SVG
 enabled

 I've checked the plug-in site for Mozilla Firefox in mozilla.org, and as
 per the instructions, downloaded the SVG plugin from Adobe (this one is
 versioned 6), copied the NPSVG6.dll and NPSVG6.zip from the installation
 folder to Mozilla Firefox's plugins folder.

 This workaround didn't work however, it still asks for me to select what
 to do with the SVG document.

 Fifth Scenario:
 Installed SVG Plugin for Mozilla Firefox, native browser support for SVG
 disabled

 This time, I disabled the svg-support inherent from Firefox itself. It no
 longer opens a Dialog box to select an action for the SVG document, however,
 it still does not load the SVG chart. It displayed the error message that I
 need a different version of web browser (IE, Firefox 1.5+, etc.)

 Finally,
 I stripped everything clean from where I started (no Adobe SVG Viewer
 plugin, native Firefox SVG support enabled) and still NO GO. I am also no
 longer able to run the Components Demo for charts seamlessly, can no longer
 load/view the chart.

 As you can see, I'm at wits end on how to turn things around. Can anyone
 please help me out?
 I assumed that Apache Trinidad was correctly used and configured in the
 web-application since I can view the charts seamlessly in the third
 scenario.

 I basically followed the codes from the source of the Components Demon for
 Charts components.

 Thanks,
 Jason DP


 --
 You rock. That's why Blockbuster's offering you one month of Blockbuster
 Total 
 Accesshttp://us.rd.yahoo.com/evt=47523/*http://tc.deals.yahoo.com/tc/blockbuster/text5.com,
 No Cost.



Re: Issue using Trinidad Chart component in Web Sphere

2008-04-04 Thread venkata guddanti
This is most likely due to no mime type being set for SVG files on
websphere. Make sure that you set svg file mime types to image/svg+xml*.
*Since there is no mime-type set, it is crashing at
response.setContentType(contentType), where contentType is null.


On Thu, Apr 3, 2008 at 9:27 AM, Shankar K [EMAIL PROTECTED] wrote:

 Hi All,

 We are facing a problem using Trinidad's(1.2.5  1.2.7) Chart component in
 Web Sphere (6.1). The chart doesn't get displayed and in the logs we see NPE
 on  com.ibm.ws.webcontainer.srt.SRTServletResponse.setContentType (Stack
 Trace below)
 We had initially thought it could be some configuration that needs to be
 done for SVG plugin in WAS and checked with IBM folks. But they say the
 problem is originating from trindad's code as
 org.apache.myfaces.trinidad.webapp.ResourceServlet._setHeaders is passing
 a null value.

 Can someone help us with this issue?
 *
 Stack Trace from WAS logs:*

 java.lang.NullPointerException
  at
 com.ibm.ws.webcontainer.srt.SRTServletResponse.setContentType(SRTServletResponse.java:1075)
  at
 org.apache.myfaces.trinidad.webapp.ResourceServlet._setHeaders(ResourceServlet.java:445)
  at
 org.apache.myfaces.trinidad.webapp.ResourceServlet.doGet(ResourceServlet.java:207)
  at javax.servlet.http.HttpServlet.service(HttpServlet.java:751)
  at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
  at
 org.apache.myfaces.trinidad.webapp.ResourceServlet.service(ResourceServlet.java:162)
  at
 com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:989)
  at
 com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:930)
  at
 com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:118)
  at
 com.ibm.ws.webcontainer.filter.WebAppFilterChain._doFilter(WebAppFilterChain.java:87)
  at
 com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:768)
  at
 com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:676)
  at
 com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:498)
  at
 com.ibm.ws.wswebcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:486)
  at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:3276)
  at
 com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:267)
  at
 com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:811)
  at
 com.ibm.ws.wswebcontainer.WebContainer.handleRequest(WebContainer.java:1455)
  at
 com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:113)
  at
 com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:454)
  at
 com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:383)
  at
 com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLReadCallback.java:102)
  at
 com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:165)
  at
 com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217)
  at
 com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161)
  at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:136)
  at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:195)
  at
 com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:743)
  at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:873)
  at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1469)


 Thanks,

 Shankar






Re: [Trinidad] Some stuff about tr:chart

2008-01-15 Thread venkata guddanti
Hi Döring,

One way you can avoid labeling all values along x-axis is if your group
labels contain null or null string(). These values will be simply ignored
during rendering. That way you can provide labels after every 'n' values. I
believe your size of groupLabels can also be less than the size of the
yValues so that you do not get that many vertical lines, For e.g. if you
have 500 values your group labels can contain only 10 so that you get only
10 vertical lines.

I will also investigate the option of providing vertical aligned x-axis
labels/y-axis labels so that the labels will not overlap. I have to first
get a consensus of API for this in the dev list and then I will see if I can
provide a patch for this.

--Venkata

On Jan 14, 2008 10:01 AM, Döring Markus [EMAIL PROTECTED]
wrote:

  Hello,



 I'm using the chart component to display some statistics.

 I have attached a screenshot of what I have so far.

 I'm a bit unhappy about the labels of the X axis. I have a lot of single
 values, and for every value there is a value on the X axis, causing that
 they overlap each other and they are not readable anymore.

 Is there a easy way to say Trinidad to render only every … label on X
 axis, or to display a total of … labels of the X axis?

 Also is there a way to align the labels on the X axis vertical instead of
 horizontal, so they don't overlap?



 Thanks

 Markus Döring



Re: [Trinidad] tr:chart doesn't work inside tr:iterator?

2007-11-02 Thread venkata guddanti
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
 

   
   
  
 



Re: [Trinidad] tr:chart doesn't work inside tr:iterator?

2007-11-01 Thread venkata guddanti
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
  
 




Re: [Trinidad] tr:chart doesn't work inside tr:iterator?

2007-11-01 Thread venkata guddanti
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
   
  
 
 



Re: [Trinidad] request backed TreeTable

2007-10-03 Thread venkata guddanti
Hi Andrew,

I believe this may not have anything to do with change persistence. The
selection and the expansion state is part for the component state
(SaveState, RestoreState).

One possibility is that you use a request scoped bean to bind the
selectedRowKeys and disclosedRowKeys attributes via EL.

Regards,
Venkata

On 10/2/07, Andrew Richards [EMAIL PROTECTED] wrote:

 Ive found the answer,

 The following context param was set in the web.xml

 context-param
   param-nameorg.apache.myfaces.trinidad.CHANGE_PERSISTENCE/param-name
   param-valuesession/param-value
 /context-param

 I cant find org.apache.myfaces.trinidad.CHANGE_PERSISTENCE in the
 documentation, there is nothing under web.xml in the dev guide(
 http://myfaces.apache.org/trinidad/devguide/configuration.html#web.xml)

 Does anyone know here this is documented so I can determine the effect of
 removing this will have on my application? I guess this has been set for a
 reason :-)

 Thanks,

 Andy

 -Original Message-
 From: Andrew Richards [mailto:[EMAIL PROTECTED]
 Sent: 02 October 2007 11:09
 To: MyFaces Discussion
 Subject: [Trinidad] request backed TreeTable

 Hi, I have a Trinidad TreeTable displaying my hierarchy of selectable data
 which works fine.

 The problem I having is that when I user selects a row in the table and
 then navigates away from the page and the returns to the page, the treeTable
 selection is persisted and the row is expanded and selected? My backing bean
 is request scoped, which confuses me?

 Does anyone know how I can force the TreeTable to return to its original
 state on every new request?

 Many thanks,

 Andy




Re: [Trinidad] Selecting in a table via Java-Code

2007-09-19 Thread venkata guddanti
The selectedRowKeys attribute is bound to an RowKeySet instance. The
RowKeySet instance is attached to the collectionModel using
setCollectionModel method. To select all rows in the table you would do
something like this:

rowKeyset.clear();
tableInstance.setRowKey(null);
rowKeyset.invertAll();

Regards,
Venkata
On 9/18/07, Tobias Kilian [EMAIL PROTECTED] wrote:

 Hi NG!

 I want to have a preselection in my tr:table with
 rowSelection=multiple . So I tried
 selectedRowKeys=#{tableInstance.selectedRowKeys} and putting something
 in the array before the table gets rendered.
 But it seams as if the attribute selectedRowKeys is meant for reading
 out which items the user selected and not for putting a selection in.
 All I want is to have all entries selected when the table is first shown.
 How do I accomplish this?

 thanks,
 Tobias Kkilian






Re: [Trinidad] Pie chart breaking with 7 items

2007-09-19 Thread venkata guddanti
Hi Florian,

If you are not having any further issue with the pie chart can I request
that this patch be committed?

Thanks,
Venkata

On 9/6/07, Florian Reiser [EMAIL PROTECTED] wrote:

 Hello Venkata,

 thanks for your work.
 I will download a snapshot of it shortly to test against and report any
 issues to you.

 With kind regards
 Florian Reiser

  Original-Nachricht 
  Datum: Thu, 6 Sep 2007 15:00:25 -0600
  Von: venkata guddanti [EMAIL PROTECTED]
  An: MyFaces Discussion users@myfaces.apache.org
  Betreff: Re: [Trinidad] Pie chart breaking with 7 items

  Hi Florian,
 
  Sorry I did not move the ticket to patch available. Now that I have done
  this hopefully it will get picked up and committed to the trunk. I also
  wanted to let you know that added a new patch with a few more
  modifications
  for supporting Safari browser. Here is the updated JIRA ticket:
 
  https://issues.apache.org/jira/browse/TRINIDAD-665
 
  Regards,
  --Venkata
 
  On 8/31/07, venkata guddanti [EMAIL PROTECTED] wrote:
  
   Hi Florian,
  
   I provided a patch for this issue. I noticed that even after providing
  the
   colors, the chart was not working since the gradient templates defined
  in
   the template SVG were also limited. There was also an issue with the
  tooltip
   for the pie not displaying at the correct location. Here is the
 updated
  JIRA
   ticket:
  
   https://issues.apache.org/jira/browse/TRINIDAD-665
  
   Regards,
   Venkata
  
   On 8/29/07, Florian Reiser [EMAIL PROTECTED] wrote:
   
Thank you, Venkata.
The JIRA ticket is opened under the id TRINIDAD-665.
   
With kind regards
Florian Reiser
   
 Original-Nachricht 
 Datum: Wed, 29 Aug 2007 14:34:05 -0600
 Von: venkata guddanti  [EMAIL PROTECTED]
 An: MyFaces Discussion users@myfaces.apache.org
 Betreff: Re: [Trinidad] Pie chart breaking with 7 items
   
 Can you please log a JIRA ticket? I will investigate and provide a
patch.

 Regards,
 Venkata

 On 8/29/07, Florian Reiser  [EMAIL PROTECTED]  wrote:
 
  Hello,
 
  I want to draw a pie chart with a total of 15 data items in a
series.
  When I render the page the chart is not shown.
 
  So I limited the number of data items in the chart and found
 out,
that
  the chart shows only with a maximum number of 5 data items.
 
  So the following works:
 
  public ListListDouble getYValues() {
ListDouble item = Arrays.asList(new Double[] {1.0, 2.0, 3.0,
  4.0
,
 5.0,
  6.0});
VectorListDouble yValues = new VectorListDouble();
yValues.add(item);
return yValues;
  }
 
  But this doesn't work:
 
  the chart shows only with a maximum number of 5 data items.
 
  So the following works:
 
  public ListListDouble getYValues() {
ListDouble item = Arrays.asList(new Double[] {1.0, 2.0, 3.0,
  4.0
,
 5.0,
  6.0, 7.0});
VectorListDouble yValues = new VectorListDouble();
yValues.add(item);
return yValues;
  }
 
  What can I do to draw all of my items?
 
  With kind regards
  Florian Reiser
  --
  GMX FreeMail: 1 GB Postfach, 5 E-Mail-Adressen, 10 Free SMS.
  Alle Infos und kostenlose Anmeldung:
http://www.gmx.net/de/go/freemail
 
   
--
GMX FreeMail: 1 GB Postfach, 5 E-Mail-Adressen, 10 Free SMS.
Alle Infos und kostenlose Anmeldung:
 http://www.gmx.net/de/go/freemail
   
  
  

 --
 GMX FreeMail: 1 GB Postfach, 5 E-Mail-Adressen, 10 Free SMS.
 Alle Infos und kostenlose Anmeldung: http://www.gmx.net/de/go/freemail



Re: [Trinidad] Numeric values in table column cells / skinning

2007-09-13 Thread venkata guddanti
Yes. Please do log a JIRA ticket for this. I believe the skin-selectors
documentation needs to be updated.

Regards,
Venkata

On 9/12/07, Carsten Pieper [EMAIL PROTECTED] wrote:


 Thanks Venkata,

  I think the selectors af|column::cell-number,  af|column::header-number
  may
  no longer be used. In ADF Faces 10.1.3 the column alignment was based on
  the
  type attribute for e.g. number, icon etc. In Trinidad the alignment is
  done
  by specifying align=start|end|left|right|center on the tr:column
  component.
 yes, that explanation makes sense to me! Then of course the selector's
 documentation
 http://myfaces.apache.org/trinidad/skin-selectors.html shouldn't mention
   af|column::cell-number
   af|column::cell-number-band
   af|column::header-number
   af|column::sortable-header-number
 anymore, right? Please correct me, if I'm wrong! (Would this be a worthy
 JIRA issue?)

 Best regards, Carsten



 ven guddanti wrote:
 
  I think the selectors af|column::cell-number,  af|column::header-number
  may
  no longer be used. In ADF Faces 10.1.3 the column alignment was based on
  the
  type attribute for e.g. number, icon etc. In Trinidad the alignment is
  done
  by specifying align=start|end|left|right|center on the tr:column
  component.
 
  tr:outputText is the right component for displaying text in the read
 only
  table. You may want to use align=right to right align the text in the
  tr:column.
 
  Regards,
  Venkata
 
  On 9/12/07, Carsten Pieper [EMAIL PROTECTED] wrote:
 
 
  Hi,
 
  probably a very simple question, but I can't find anything relevant...
 
  There are selectors for numeric stuff in table column, e.g.
  af|column::cell-number
  af|column::header-number
 
  I have something like:
 
  tr:column headerText=bigDec
  tr:outputText
  value=#{myBigDec}/tr:outputText
  /tr:column
 
  I'm just wandering how to tell a certain column that its content is
  numeric.
  I couldn't find any tr:column or tr:outputText attributes to set this.
  Thus, I always end up with text columns.
 
  Or is using the tr:outputText for numeric column content just plainly
  wrong?
  If so, what would the right component be to show numeric values in
 table
  columns?
 
  Thanks a lot,
  Carsten
  --
  View this message in context:
 
 http://www.nabble.com/-Trinidad--Numeric-values-in-table-column-cells---skinning-tf4428906.html#a12634317
  Sent from the MyFaces - Users mailing list archive at Nabble.com.
 
 
 
 

 --
 View this message in context:
 http://www.nabble.com/-Trinidad--Numeric-values-in-table-column-cells---skinning-tf4428906.html#a12649085
 Sent from the MyFaces - Users mailing list archive at Nabble.com.




Re: [Trinidad] Numeric values in table column cells / skinning

2007-09-12 Thread venkata guddanti
I think the selectors af|column::cell-number,  af|column::header-number may
no longer be used. In ADF Faces 10.1.3 the column alignment was based on the
type attribute for e.g. number, icon etc. In Trinidad the alignment is done
by specifying align=start|end|left|right|center on the tr:column
component.

tr:outputText is the right component for displaying text in the read only
table. You may want to use align=right to right align the text in the
tr:column.

Regards,
Venkata

On 9/12/07, Carsten Pieper [EMAIL PROTECTED] wrote:


 Hi,

 probably a very simple question, but I can't find anything relevant...

 There are selectors for numeric stuff in table column, e.g.
 af|column::cell-number
 af|column::header-number

 I have something like:

 tr:column headerText=bigDec
 tr:outputText
 value=#{myBigDec}/tr:outputText
 /tr:column

 I'm just wandering how to tell a certain column that its content is
 numeric.
 I couldn't find any tr:column or tr:outputText attributes to set this.
 Thus, I always end up with text columns.

 Or is using the tr:outputText for numeric column content just plainly
 wrong?
 If so, what would the right component be to show numeric values in table
 columns?

 Thanks a lot,
 Carsten
 --
 View this message in context:
 http://www.nabble.com/-Trinidad--Numeric-values-in-table-column-cells---skinning-tf4428906.html#a12634317
 Sent from the MyFaces - Users mailing list archive at Nabble.com.




Re: [Trinidad] TreeTable - expand all.

2007-09-06 Thread venkata guddanti
You can expand all nodes in the treeTable by specifying the disclosedRowKeys
on the component. If the disclosedRowKeys contains all the nodes in the
treeTable, the entire tree will be displayed as expanded.

Regards,
Venkata

On 9/6/07, Darren McEntee [EMAIL PROTECTED] wrote:

 Hi, we're not getting any errors, we would just like to have a treeTable
 expanded by default on page load.

 Maybe we will have to implement it on a customised treeTable model of
 our own?

 Thanks,
 Darren.

 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of
 Matthias Wessendorf
 Sent: 06 September 2007 11:34
 To: MyFaces Discussion
 Subject: Re: [Trinidad] TreeTable - expand all.

 ** This Message Originated From The Internet Please Be Aware Of
 Suspicious Attachments And Content **

 not really sure on this.
 Question: have you tried something in this directions?
 What are the errors you are seeing ?

 thx,
 Matthias

 On 9/5/07, Darren McEntee [EMAIL PROTECTED] wrote:
 
 
 
 
 
  Hi all,
 
 
 
  I've a quick question regarding the tr:treeTable component.
 
  What I want too do is have the option for the treeTable to be expanded
 by
  default on specific pages on initial page loading.
 
  I see in the treeTable has the expandAllEnabled attribute which
 decides
  whether the Expand All  Collapse All links are rendered.
 
 
 
  I don't see an option to have the tree expanded/collapsed by default
 on a
  specific page.
 
  Can anyone tell me if this is possible?
 
 
 
  Thanks.
 
 
 
  Best regards,
 
  Darren.
 
 
 
  P Please consider the environment before printing this email
   _
 
  1. The information contained in this E-mail, including any files
 transmitted
  with it, is confidential and may be legally privileged. This E-mail is
  intended only for the personal attention of the stated addressee(s).
 Any
  access to this E-mail, including any files transmitted with it, by any
 other
  person is unauthorised. If you are not an addressee, you must not
 disclose,
  copy, circulate or in any other way use or rely on the information
 contained
  in this E-mail or any files transmitted with it. Such unauthorised use
 may
  be unlawful. If you have received this E-mail in error, please inform
 the
  sender immediately and delete it and all copies from your system. You
 may
  not forward this E-mail without the permission of the sender.
 
  2. The views expressed in this E-mail are those of the author, and do
 not
  necessarily represent the views of AMT-SYBEX. Internet communications
 are
  not secure and AMT-SYBEX cannot, therefore, accept legal
 responsibility for
  the contents of this message nor for any damage caused by viruses.
 
   AMT-SYBEX Limited is a UK company, registration number GB03036807 at
  address The Spirella Building, Bridge Road, Letchworth, SG6 4ET.
   AMT-SYBEX (NI) Limited is a UK company, registration number NI024104
 at
  address Edgewater Office Park, Edgewater Rd, Belfast, BT3 9JQ.
  For more information on the AMT-SYBEX Group visit
 http://www.amt-sybex.com
  _
 


 --
 Matthias Wessendorf

 further stuff:
 blog: http://matthiaswessendorf.wordpress.com/
 mail: matzew-at-apache-dot-org



 P Please consider the environment before printing this email



Re: [trinidad] create scrollable div for layout manager (like panelGroupLayout) on FireFox

2007-09-06 Thread venkata guddanti
One suggestion( a wild guess maybe!) that I can make is that you can put
inlineStyle=position:relative on all the panelBox components inside the
panelGroupLayout.

If you have firebug installed for FF 2.0 you can go to the content and
change the styles on the panelBox and panelGroupLayout dom elements to get
the desired result.

On 9/6/07, Martin Ahrer [EMAIL PROTECTED] wrote:


 We have just figured out that this behaviour is related to the fact that
 the
 panelGroupLayout is embraced by a panelPage element! It works in Firefox
 when removing everything but the panelGroupLayout.


 Martin Ahrer wrote:
 
  We are trying to show a scrollable panel component which works fine on
 IE7
  but fails on Firefox 2.0.x.
 
  tr:panelGroupLayout layout=vertical styleClass=scrollBox
   ... here are several panelBox components with nested components like
  (inputText etc.) ...
  /tr:panelGroupLayout
 
  The style definition is
 
  .scrollBox {
overflow: auto;
height: 200px;
  }
 
  Firefox (being an important target browser platform for us) displays a
  scrollbar but refuses to display the contents of the panelGroupLayout
  component. This is rather considered a CSS problem but eventually
 implied
  by the quite complex html created bY trinidad.
 
  If anybody in the forum has encountered this behaviour feedback
 regarding
  workarounds would be appreciated.
 

 --
 View this message in context:
 http://www.nabble.com/-trinidad--create-scrollable-div-for-layout-manager-%28like-panelGroupLayout%29-on-FireFox-tf4392243.html#a12522975
 Sent from the MyFaces - Users mailing list archive at Nabble.com.




Re: [Trinidad] Pie chart breaking with 7 items

2007-09-06 Thread venkata guddanti
Hi Florian,

Sorry I did not move the ticket to patch available. Now that I have done
this hopefully it will get picked up and committed to the trunk. I also
wanted to let you know that added a new patch with a few more modifications
for supporting Safari browser. Here is the updated JIRA ticket:

https://issues.apache.org/jira/browse/TRINIDAD-665

Regards,
--Venkata

On 8/31/07, venkata guddanti [EMAIL PROTECTED] wrote:

 Hi Florian,

 I provided a patch for this issue. I noticed that even after providing the
 colors, the chart was not working since the gradient templates defined in
 the template SVG were also limited. There was also an issue with the tooltip
 for the pie not displaying at the correct location. Here is the updated JIRA
 ticket:

 https://issues.apache.org/jira/browse/TRINIDAD-665

 Regards,
 Venkata

 On 8/29/07, Florian Reiser [EMAIL PROTECTED] wrote:
 
  Thank you, Venkata.
  The JIRA ticket is opened under the id TRINIDAD-665.
 
  With kind regards
  Florian Reiser
 
   Original-Nachricht 
   Datum: Wed, 29 Aug 2007 14:34:05 -0600
   Von: venkata guddanti  [EMAIL PROTECTED]
   An: MyFaces Discussion users@myfaces.apache.org
   Betreff: Re: [Trinidad] Pie chart breaking with 7 items
 
   Can you please log a JIRA ticket? I will investigate and provide a
  patch.
  
   Regards,
   Venkata
  
   On 8/29/07, Florian Reiser  [EMAIL PROTECTED]  wrote:
   
Hello,
   
I want to draw a pie chart with a total of 15 data items in a
  series.
When I render the page the chart is not shown.
   
So I limited the number of data items in the chart and found out,
  that
the chart shows only with a maximum number of 5 data items.
   
So the following works:
   
public ListListDouble getYValues() {
  ListDouble item = Arrays.asList(new Double[] {1.0, 2.0, 3.0, 4.0
  ,
   5.0,
6.0});
  VectorListDouble yValues = new VectorListDouble();
  yValues.add(item);
  return yValues;
}
   
But this doesn't work:
   
the chart shows only with a maximum number of 5 data items.
   
So the following works:
   
public ListListDouble getYValues() {
  ListDouble item = Arrays.asList(new Double[] {1.0, 2.0, 3.0, 4.0
  ,
   5.0,
6.0, 7.0});
  VectorListDouble yValues = new VectorListDouble();
  yValues.add(item);
  return yValues;
}
   
What can I do to draw all of my items?
   
With kind regards
Florian Reiser
--
GMX FreeMail: 1 GB Postfach, 5 E-Mail-Adressen, 10 Free SMS.
Alle Infos und kostenlose Anmeldung:
  http://www.gmx.net/de/go/freemail
   
 
  --
  GMX FreeMail: 1 GB Postfach, 5 E-Mail-Adressen, 10 Free SMS.
  Alle Infos und kostenlose Anmeldung: http://www.gmx.net/de/go/freemail
 




Re: Best way to right-dock the sort icon in a tr:table column header?

2007-09-06 Thread venkata guddanti
The Display:none is not necessary on the table. In our case we were
displaying the sort indicator when the user mouses over the header and
hiding it on mouseout. Also note that it should be float:left in RTL.

Regards,
Venkata

On 9/6/07, venkata guddanti [EMAIL PROTECTED] wrote:

 I think you do not need a span around the text of the outputText. You can
 add a div in the header with float:right that contains the sort image. Here
 is dom snapshot of  out table header:

 .xq6 {DISPLAY: inline-block;BACKGROUND-IMAGE:
 url(/faces-trunk/afr/sort_des_n.png);WIDTH: 14px;CURSOR: default;
 BACKGROUND-REPEAT: no-repeat;HEIGHT: 14px;TEXT-DECORATION: none}

 .xq5 {DISPLAY: inline-block;BACKGROUND-IMAGE:
 url(/faces-trunk/afr/sort_asc_n.png);WIDTH: 14px;CURSOR: default;
 BACKGROUND-REPEAT: no-repeat;HEIGHT: 14px;TEXT-DECORATION: none}

 THDIV style=FLOAT: right; POSITION: relativeTABLE class=xqo
 id=demoTemplate:table:j_id___jsp_tag_ctru20::afrSI style=DISPLAY: none
 cellSpacing=0 cellPadding=0 summary= border=0TBODYTRTD
 _afrSortAsc=1A class=xq5 title=Sort Ascending/A/TDTD
 _afrSortDesc=1A class=xq6 title=Sort
 Descending/A/TD/TR/TBODY/TABLE/DIVName/TH

 On 9/6/07, Andrew Robinson [EMAIL PROTECTED] wrote:
 
  Any suggestions on the best way to get the sort icon to dock on the
  right with the text left-aligned?
 
  using float:right on the link is hard to get working cross-browser as
  floating right tends to mess up line wrapping especially in IE.
 
  I got it somewhat working with putting a span around the text:
 
tr:column sortable=true sortProperty=name
  f:facet name=header
tr:outputText styleClass=sortHeader value=Name /
  /f:facet
  #{var.name}
/tr:column
  And using:
 
  SPAN.sortHeader {
display: block;
width: 100%;
float: left;
  }
 
  It worked in FF 2, but not a pretty solution. Any tips on a better idea?
 




Re: Best way to right-dock the sort icon in a tr:table column header?

2007-09-06 Thread venkata guddanti
I think you do not need a span around the text of the outputText. You can
add a div in the header with float:right that contains the sort image. Here
is dom snapshot of  out table header:

.xq6 {DISPLAY: inline-block;BACKGROUND-IMAGE:
url(/faces-trunk/afr/sort_des_n.png);WIDTH: 14px;CURSOR: default;
BACKGROUND-REPEAT: no-repeat;HEIGHT: 14px;TEXT-DECORATION: none}

.xq5 {DISPLAY: inline-block;BACKGROUND-IMAGE:
url(/faces-trunk/afr/sort_asc_n.png);WIDTH: 14px;CURSOR: default;
BACKGROUND-REPEAT: no-repeat;HEIGHT: 14px;TEXT-DECORATION: none}

THDIV style=FLOAT: right; POSITION: relativeTABLE class=xqo
id=demoTemplate:table:j_id___jsp_tag_ctru20::afrSI style=DISPLAY: none
cellSpacing=0 cellPadding=0 summary= border=0TBODYTRTD
_afrSortAsc=1A class=xq5 title=Sort Ascending/A/TDTD
_afrSortDesc=1A class=xq6 title=Sort
Descending/A/TD/TR/TBODY/TABLE/DIVName/TH

On 9/6/07, Andrew Robinson [EMAIL PROTECTED] wrote:

 Any suggestions on the best way to get the sort icon to dock on the
 right with the text left-aligned?

 using float:right on the link is hard to get working cross-browser as
 floating right tends to mess up line wrapping especially in IE.

 I got it somewhat working with putting a span around the text:

   tr:column sortable=true sortProperty=name
 f:facet name=header
   tr:outputText styleClass=sortHeader value=Name /
 /f:facet
 #{var.name}
   /tr:column
 And using:

 SPAN.sortHeader {
   display: block;
   width: 100%;
   float: left;
 }

 It worked in FF 2, but not a pretty solution. Any tips on a better idea?



Re: [Trinidad] chart component in a h:datatable leads to javax.faces.el.PropertyNotFoundException - Base is null:

2007-09-05 Thread venkata guddanti
Hi Claus,

This probably due to the fact that chart component does not implement
valueHolder interface. Currently I believe only valueHolder components can
be put inside the table. Can you use trh:tableLayout with c:forEach instead?

Venkata

On 9/3/07, Claus Elsborg Laursen [EMAIL PROTECTED] wrote:

 Hi,

 I am trying to use the tr:chart component inside a h:datatable

 But it gives an exception like this:
 javax.faces.el.PropertyNotFoundException: Base is null: campaign
 at
 org.apache.myfaces.el.ValueBindingImpl.resolveToBaseAndProperty(ValueBin
 dingImpl.java:463)
 at
 org.apache.myfaces.el.ValueBindingImpl.setValue(ValueBindingImpl.java:25
 1)
 at
 org.apache.myfaces.application.ApplicationImpl.createComponent(Applicati
 onImpl.java:447)
 at
 javax.faces.webapp.UIComponentTag.createComponentInstance(UIComponentTag
 .java:881)
 at
 javax.faces.webapp.UIComponentTag.findComponent(UIComponentTag.java:768)
 at
 javax.faces.webapp.UIComponentTag.doStartTag(UIComponentTag.java:472)
 at
 org.apache.myfaces.trinidad.webapp.UIXComponentTag.doStartTag(UIXCompone
 ntTag.java:102)


 The following jsf code has been used:

 ...
 h:form id=campaignform
 h:dataTable
 headerClass=standardtable-header-left

 rowClasses=standardtable-row-1,standardtable-row-1
  var=campaign
  value=#{IndexChartBean.campaigns}
 
 h:column
 f:facet name=header
 h:outputText
 value=#{messages.chartLabel}/
 /f:facet
 tr:outputText
 value=#{campaign.campaignChart.value.title}/
 tr:outputText
 value=#{campaign.campaignChart.chart.type}/
 tr:chart id=chart
   YMajorGridLineCount=3
 value=#{campaign.campaignChart.value}
   inlineStyle=width:680px;
 height:120px;

 binding=#{campaign.campaignChart.chart}/

 /h:column

 /h:dataTable
 /h:form
 ...

 If I remove the tr:chart part, the page works fine and the
 tr:outputText elements inserted for test are shown correctly in the
 table.

 I am also able to use the chart component outside a h:datatable
 without any problems.

 Any suggestions?

 Regards,
 Claus Elsborg




Re: [Trinidad] Pie chart breaking with 7 items

2007-08-31 Thread venkata guddanti
Hi Florian,

I provided a patch for this issue. I noticed that even after providing the
colors, the chart was not working since the gradient templates defined in
the template SVG were also limited. There was also an issue with the tooltip
for the pie not displaying at the correct location. Here is the updated JIRA
ticket:

https://issues.apache.org/jira/browse/TRINIDAD-665

Regards,
Venkata

On 8/29/07, Florian Reiser [EMAIL PROTECTED] wrote:

 Thank you, Venkata.
 The JIRA ticket is opened under the id TRINIDAD-665.

 With kind regards
 Florian Reiser

  Original-Nachricht 
  Datum: Wed, 29 Aug 2007 14:34:05 -0600
  Von: venkata guddanti [EMAIL PROTECTED]
  An: MyFaces Discussion users@myfaces.apache.org
  Betreff: Re: [Trinidad] Pie chart breaking with 7 items

  Can you please log a JIRA ticket? I will investigate and provide a
 patch.
 
  Regards,
  Venkata
 
  On 8/29/07, Florian Reiser  [EMAIL PROTECTED] wrote:
  
   Hello,
  
   I want to draw a pie chart with a total of 15 data items in a series.
   When I render the page the chart is not shown.
  
   So I limited the number of data items in the chart and found out, that
   the chart shows only with a maximum number of 5 data items.
  
   So the following works:
  
   public ListListDouble getYValues() {
 ListDouble item = Arrays.asList(new Double[] {1.0, 2.0, 3.0, 4.0,
  5.0,
   6.0});
 VectorListDouble yValues = new VectorListDouble();
 yValues.add(item);
 return yValues;
   }
  
   But this doesn't work:
  
   the chart shows only with a maximum number of 5 data items.
  
   So the following works:
  
   public ListListDouble getYValues() {
 ListDouble item = Arrays.asList(new Double[] {1.0, 2.0, 3.0, 4.0,
  5.0,
   6.0, 7.0});
 VectorListDouble yValues = new VectorListDouble();
 yValues.add(item);
 return yValues;
   }
  
   What can I do to draw all of my items?
  
   With kind regards
   Florian Reiser
   --
   GMX FreeMail: 1 GB Postfach, 5 E-Mail-Adressen, 10 Free SMS.
   Alle Infos und kostenlose Anmeldung: http://www.gmx.net/de/go/freemail
  

 --
 GMX FreeMail: 1 GB Postfach, 5 E-Mail-Adressen, 10 Free SMS.
 Alle Infos und kostenlose Anmeldung: http://www.gmx.net/de/go/freemail



Re: [Trinidad] how to get tr:table rowKeys

2007-08-30 Thread venkata guddanti
The index of the element in the array is the rowKey. Trinidad wraps the
array into SortableModel.

--Venkata

On 8/30/07, Renzo Tomaselli [EMAIL PROTECTED] wrote:

 Hi, I used to manage tr:table through my own DataModel, which defines
 and returns rowKeys.
 However, for simpler cases usually just a row array is enough, where row
 objects offer all field getters. Thus no special model is needed.
 If I want to preselect some rows by means of the selectedRowKeys
 attribute, how do I get rowKeys from array elements/positions ?
 Thanks,

 -- Renzo




Re: [Trinidad] Pie chart breaking with 7 items

2007-08-29 Thread venkata guddanti
Can you please log a JIRA ticket? I will investigate and provide a patch.

Regards,
Venkata

On 8/29/07, Florian Reiser  [EMAIL PROTECTED] wrote:

 Hello,

 I want to draw a pie chart with a total of 15 data items in a series.
 When I render the page the chart is not shown.

 So I limited the number of data items in the chart and found out, that
 the chart shows only with a maximum number of 5 data items.

 So the following works:

 public ListListDouble getYValues() {
   ListDouble item = Arrays.asList(new Double[] {1.0, 2.0, 3.0, 4.0, 5.0,
 6.0});
   VectorListDouble yValues = new VectorListDouble();
   yValues.add(item);
   return yValues;
 }

 But this doesn't work:

 the chart shows only with a maximum number of 5 data items.

 So the following works:

 public ListListDouble getYValues() {
   ListDouble item = Arrays.asList(new Double[] {1.0, 2.0, 3.0, 4.0, 5.0,
 6.0, 7.0});
   VectorListDouble yValues = new VectorListDouble();
   yValues.add(item);
   return yValues;
 }

 What can I do to draw all of my items?

 With kind regards
 Florian Reiser
 --
 GMX FreeMail: 1 GB Postfach, 5 E-Mail-Adressen, 10 Free SMS.
 Alle Infos und kostenlose Anmeldung: http://www.gmx.net/de/go/freemail



Re: [Trinidad] Pie chart breaking with 7 items

2007-08-29 Thread venkata guddanti
I looked at this issue a bit more. The problem is the chartModel base class
defines only six colors. You can  override:

public ListColor getSeriesColors()

// The default implementation is as follows:
  public ListColor getSeriesColors()
  {
return _defaultColors;
  }

  private static final ListColor _defaultColors = new ArrayListColor();

  static
  {
_defaultColors.addAll(
  Arrays.asList(new Color[]{new Color(231,109,72,0),new
Color(110,166,243,0),new Color(157,206,110,0),new Color(252,196,111,0),new
Color(114,126,142,0),new Color(109,44,145,0)}));
  }

However I agree that the current implementation is not correct. If it cannot
find the colors it should throw an exception on the server or it should wrap
around and reuse the colors. So if you enter a JIRA ticket for it, I can
provide the patch for it.

Regards,
Venkata
On 8/29/07, venkata guddanti [EMAIL PROTECTED] wrote:

 Can you please log a JIRA ticket? I will investigate and provide a patch.

 Regards,
 Venkata

 On 8/29/07, Florian Reiser  [EMAIL PROTECTED] wrote:
 
  Hello,
 
  I want to draw a pie chart with a total of 15 data items in a series.
  When I render the page the chart is not shown.
 
  So I limited the number of data items in the chart and found out, that
  the chart shows only with a maximum number of 5 data items.
 
  So the following works:
 
  public ListListDouble getYValues() {
ListDouble item = Arrays.asList(new Double[] {1.0, 2.0, 3.0, 4.0,
  5.0, 6.0});
VectorListDouble yValues = new VectorListDouble();
yValues.add(item);
return yValues;
  }
 
  But this doesn't work:
 
  the chart shows only with a maximum number of 5 data items.
 
  So the following works:
 
  public ListListDouble getYValues() {
ListDouble item = Arrays.asList(new Double[] {1.0, 2.0, 3.0, 4.0,
  5.0, 6.0, 7.0});
VectorListDouble yValues = new VectorListDouble();
yValues.add(item);
return yValues;
  }
 
  What can I do to draw all of my items?
 
  With kind regards
  Florian Reiser
  --
  GMX FreeMail: 1 GB Postfach, 5 E-Mail-Adressen, 10 Free SMS.
  Alle Infos und kostenlose Anmeldung: http://www.gmx.net/de/go/freemail
 




Re: Trinidad Chart ppr

2007-07-20 Thread venkata guddanti

Unfortunately when the chart is being PPR the entire chart is being PPRed.
One thing you may want to do is to turn off animation(animationDuration=0)
since it is annoying when the chart is being refreshed using af:poll. This
make it look like only the chart bars are refreshing.

Venkata

On 7/20/07, sgthawk [EMAIL PROTECTED] wrote:



Hello,

I use the trinidad chart wit  tr:poll in order to update the chart
periodically(every 5 sec). it works really good but something is annoying
and i dont konw if it solvable. The whole chart is alwalys updated but i
like to see is, that ONLY the bar values onl updated because they are only
the values which are changing.


--
View this message in context:
http://www.nabble.com/Trinidad-Chart-ppr-tf4116170.html#a11705431
Sent from the MyFaces - Users mailing list archive at Nabble.com.




Re: [Trinidad] Can the chart generated svg be converted to images?

2007-07-20 Thread venkata guddanti

Currently I believe the IE Adobe SVG viewer plugin has an option to save the
generated SVG content. You can then take the SVG output to any of the SVG
authoring tool and convert it into images.

Also Emia Renesis SVG player in IE has an option to save the generated SVG
content as an image. But unfortunately the player does not work with the
chart control. I have not found the time to make the chart component
compatible with it. Moreover the Renesis player is in beta (.7 version). I
was hoping to wait for the final release.

On 7/19/07, Wesley Hales [EMAIL PROTECTED] wrote:


Curious if anyone has tried or knows of a way to convert the charts that
are generated to images?



Re: [Trinidad] Chart in output but not displayed?!

2007-07-16 Thread venkata guddanti

Hi Andre,

I tried your sample and the only time I am seeing this issue is if I create
a jspx page with your sample in IE. The sample has html, head etc tags that
are not necessary. The following jpsx is working good for me:

?xml version=1.0 encoding=iso-8859-1 standalone=yes ?

jsp:root xmlns:jsp=http://java.sun.com/JSP/Page; version=2.0
 xmlns:f=http://java.sun.com/jsf/core;
 xmlns:tr=http://myfaces.apache.org/trinidad; 
 jsp:directive.page contentType=text/html;charset=utf-8/
 f:view
  tr:outputText value=Hallo Trinidad/tr:outputText
  tr:chart id=chart value=#{chart.value} binding=#{chart.component}
inlineStyle=width:680px; height:400px; gradientsUsed=false
perspective=false type=verticalBar animationDuration=0
rendered=true
 /tr:chart
/f:view
/jsp:root

Regards,
Venkata


On 7/16/07, Andre_Fritsch [EMAIL PROTECTED] wrote:



Hi!

I tried to create my own trindad chart based on the example. therefore i
created a chart class with this code:

package mypack;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

import javax.faces.component.UIComponent;

import org.apache.myfaces.trinidad.component.core.data.CoreChart;
import org.apache.myfaces.trinidad.model.ChartModel;


public class MyChartBean implements java.io.Serializable{


 private UIComponent _editedComponent;
 private final ChartModel _chartModel = new MyChartModel();

 public void setComponent(UIComponent component)
 {
 _editedComponent = component;
 }

 public UIComponent getComponent()
 {
 return _editedComponent;
 }

 public ChartModel getValue()
  {
return _chartModel;
  }


 private class MyChartModel extends ChartModel
{
public List getGroupLabels() {
// TODO Auto-generated method stub
return _groupLabels;
}

public List getSeriesLabels() {
// TODO Auto-generated method stub
return _seriesLabels;
}

public List getYValues() {
// TODO Auto-generated method stub
return _chartYValues;
}

public Double getMinYValue()
{
  CoreChart chart = (CoreChart)_editedComponent;
  return 0.0;
}

public Double getMaxYValue()
{
  CoreChart chart = (CoreChart)_editedComponent;
  return 20.0;
}


 public Double getMaxXValue()
{

return 10.0;
}

public Double getMinXValue()
{
return 6.0;
}

public String getTitle()
{
  CoreChart chart = (CoreChart)_editedComponent;
  return Title;
}


public String getSubTitle()
{
  CoreChart chart = (CoreChart)_editedComponent;
return SubTitle;
}

public String getFootNote()
{
  CoreChart chart = (CoreChart)_editedComponent;
return FootNote;
}

public ListListDouble getXValues()
{
  CoreChart chart = (CoreChart)_editedComponent;
  if(XYLine.equals(chart.getType()) ||
scatterPlot.equals(chart.getType()))
  {
return _chartXValues;
  }
  else
return null;
}

private final ListString _seriesLabels =
  Arrays.asList(new String[]{Previous, Target, Actual});

private final ListString _groupLabels =
  Arrays.asList(new String[]{June, July, August,
September,October});


private final ArrayListListDouble _chartYValues;
  private final ArrayListListDouble _chartXValues;
  private final ArrayListListDouble _dialchartYValues;
  private ArrayListListDouble _largerYValues;
  private ArrayListListDouble _largerXValues;
  {
_chartYValues = new ArrayListListDouble();
_chartYValues.add(Arrays.asList(new Double[]{135235.0, 155535.0,
141725.0}));
_chartYValues.add(Arrays.asList(new Double[]{106765., 131725.,
127868.}));
_chartYValues.add(Arrays.asList(new Double[]{108456., 119326.,
139326.}));
_chartYValues.add(Arrays.asList(new Double[]{136765., 147265.,
184349.}));
_chartYValues.add(Arrays.asList(new Double[]{107868., 113968.,
174349.}));

_dialchartYValues = new ArrayListListDouble();
_dialchartYValues.add(Arrays.asList(new Double[]{135.}));
_dialchartYValues.add(Arrays.asList(new Double[]{106.}));

_chartXValues = new ArrayListListDouble();
_chartXValues.add(Arrays.asList(new Double[]{6.1, 6.3, 6.5}));
_chartXValues.add(Arrays.asList(new Double[]{6.8, 7.1, 7.3}));
_chartXValues.add(Arrays.asList(new Double[]{7.6, 7.8, 8.0}));
_chartXValues.add(Arrays.asList(new Double[]{8.25, 8.55, 8.78}));
_chartXValues.add(Arrays.asList(new Double[]{9.23, 9.48, 9.88}));
  }

}

}



my trinidad page contains this code:

%@ taglib