Menu

Dynamically creating chart tags?

Help
2010-05-19
2013-01-13
  • Jit Sengupta

    Jit Sengupta - 2010-05-19

    Hello:

    Is it possible to create the chart producers and tags dynamically? I need to build a page that has a dynamic number of charts based on items in a database. I understand that each chart has to be associated with a unique javabean ID, which is keeping me from dynamically creating these charts (all charts generated are becoming exactly the same - makes sense since I am using the same javabean). My question is - is there any way to use the same bean, maybe using different parameters, to create different charts?

    Also, can the title be dynamically generated? I tried something like

    <cewolf:chart title="<%=mytitle%>"…. />

    That does not seem to work.

    Any help would be greatly appreciated.

    Thanks!

    Jit

     
  • Anonymous

    Anonymous - 2010-05-19

    Hello,

    I don't know what is exactly you want, I will try to help.

    You can use expressions in cewolf, for example in the title.

    <cewolf:charttitle="${customTitle}""…. />

    Where customTitle is a variable in some scope, reques, session, application. I think that you can use too in chart id.

    <cewolf:producer id="${dynamicId}">

    Like an alternative I know that you can use cewolf with velocity templates (https://cwiki.apache.org/WW/cewolf-charts-using-velocity-templates.html), but i don´t know if it's what you desire.

    Regards,

    CDS

     

Log in to post a comment.