i've only used jfreechart with struts2 (not portlets) and its more to do with 
the way the result is returned than the action class itself.

 

in struts.xml i have 

 

<result-type name="chart" class="org.apache.struts2.dispatcher.ChartResult"/>

 

and then referenced in action definition

 

  <action name="GenerateChart" class="uk.co.acudev.actions.GenerateChart">
   <result name="success" type="chart">
    <param name="width">400</param>
    <param name="height">400</param> 
   </result>
  </action>


then in action the field chart will have my generated chart ready to be picked 
up by result processing

 

private JFreeChart chart;

 

 

not sure of that helps

 

adam

 


 
> Date: Wed, 29 Sep 2010 14:39:54 +0200
> Subject: Possible to combine struts2-portlet-plugin and 
> struts2-jfreechart-plugin?
> From: perj...@gmail.com
> To: user@struts.apache.org
> 
> Hi,
> In my development team we have just started to use the
> struts2-portlet-plugin.
> We want to create a portlet that renders a chart to include in a page, and
> we try to use the struts2-jfreechart-plugin for this. So far no luck with
> this.
> Is it possible to create an action that is both a "portlet action"
> extending struts-portlet-default, and a "jfree chart action" extending
> jfreechart-default?
> /Best regards, Per Johansson
                                          

Reply via email to