I'm using an interceptor to store (and clear) a DefaultPieDataset in the
users session from actions that give me the data needed to create charts. My
chart action implements SessionAware and I get the dataset from the session.
I also created a package for the charts that extends struts-default because
the charts plugin doesn't define any interceptors AFAICT. I then get the
chart using an image tag in a modal window which calls my chart action.

<img src="charts/pie.action" width="600" height="200">

  <package name="charts" extends="struts-default" namespace="/charts">
<result-types>            <result-type name="chart"
class="org.apache.struts2.dispatcher.ChartResult">                <param
name="height">150</param>                <param name="width">200</param>
</result-type>        </result-types>                 <action name="pie"
class="....ChartAction">            <result name="success" type="chart">
<param name="width">600</param>                <param
name="height">200</param>             </result>        </action>
</package>

This type of configuration would work for your scenario also. If you have a
huge dataset then storing it in the session could cause an issue with
scalability. With a chart I wouldn¹t imagine that the dataset would be that
large though.

Regards,
Randy Burgess
Sr. Web Applications Developer
Nuvox Communications



> From: Leena Borle <[EMAIL PROTECTED]>
> Reply-To: Struts Users Mailing List <user@struts.apache.org>
> Date: Tue, 13 May 2008 13:50:00 -0700
> To: Struts Users Mailing List <user@struts.apache.org>
> Subject: Re: JFreeChart plugin
> 
> Hi,
>   I'm using Tomcat-5.5.25. I found out that, if I include action's url in
> <img src="DrawChart_display.action" alt="No Image"  />, it gets displayed.
>   I am trying to display chart using Remote-Button/Remote-DIV method of S2.
> Which means when user submits form data, I need to display chart inside a
> DIV below this form. something like this ...
>       <s:form>
>                    .....
>                  <s:submit value="Draw chart" href="%{display_chart}"
> theme="ajax" targets="chart_div"
>                 cssClass="buttons" />
>         </s:form>
> 
>     <div id="chart_div"></div>
> 
>     </div>
>       Any idea how to achieve this without specifying action's URL directly
> to image tag ?
> 
> Leena
> 
> On Tue, May 13, 2008 at 11:45 AM, Randy Burgess <[EMAIL PROTECTED]> wrote:
> 
>> I used the example code from the documentation on WebLogic 9.2.2 and it
>> ran
>> fine. I built off that example code and now have several actions creating
>> nice 3D pie charts. Which application server are you using?
>> 
>> Regards,
>> Randy Burgess
>> Sr. Web Applications Developer
>> Nuvox Communications
>> 
>> 
>> 
>>> From: Leena Borle <[EMAIL PROTECTED]>
>>> Reply-To: Struts Users Mailing List <user@struts.apache.org>
>>> Date: Tue, 13 May 2008 10:41:57 -0700
>>> To: Struts Users Mailing List <user@struts.apache.org>
>>> Subject: JFreeChart plugin
>>> 
>>> Hello,
>>>   Has anyone tried out JFreeChart plugin? I am trying to run the sample
>> code
>>> available on plugin documentation page. I see all ASCII characters
>> getting
>>> printed on my browser screen instead of an image file.
>>>   Any help is appreciated.
>>> Thanks,
>>> Leena.
>> 
>> 
>> 
>> This email and any attachments ("Message") may contain legally privileged
>> and/or confidential information.  If you are not the addressee, or if this
>> Message has been addressed to you in error, you are not authorized to read,
>> copy, or distribute it, and we ask that you please delete it (including all
>> copies) and notify the sender by return email.  Delivery of this Message to
>> any person other than the intended recipient(s) shall not be deemed a waiver
>> of confidentiality and/or a privilege.
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>> 
>> 



This email and any attachments ("Message") may contain legally privileged 
and/or confidential information.  If you are not the addressee, or if this 
Message has been addressed to you in error, you are not authorized to read, 
copy, or distribute it, and we ask that you please delete it (including all 
copies) and notify the sender by return email.  Delivery of this Message to any 
person other than the intended recipient(s) shall not be deemed a waiver of 
confidentiality and/or a privilege.

Reply via email to