Looking at your action definition, I believe the URL should be
src="/chart/ViewSimpleXYChart.html".

Matt

On 7/12/07, Travers Snyman <[EMAIL PROTECTED]> wrote:




I think my problem has to do with struts namespaces. The jsp I am using the ajax call from is in the 
default package and the chart action in another package called "chart" because I have to extend 
jfreechart-default here. My problem is <img:image src="/viewSimpleXYChart.html"/> gives



There is no Action mapped for namespace / and action name viewSimpleXYChart. - 
[unknown location]



Any help appreciated



Travers

  ________________________________


From: Travers Snyman [mailto:[EMAIL PROTECTED]
 Sent: 10 July 2007 02:41 PM
 To: [email protected]
 Subject: [appfuse-user] using ajax to render a chart in appfuse 2 m5




Hi,

I created a simple action class to generate a chart. I use the 
struts-jfreechart plugin to get the chart result type. I now want to render the 
chart by doing something like this in a jsp:



<s:url id="ajaxChartUrl" value="/viewSimpleXYChart.html"/>

<s:div theme="ajax"

               href="%{ ajaxChartUrl }" loadingText="Loading Chart..." >

</s:div>



My struts.xml is configured as follows:



        <package name = "chart" extends="jfreechart-default">

           <action name="ViewSimpleXYChart" 
class="cam.webapp.action.XYChartAction" >

             <result name="success" type="chart">

               </result>

            </action>

         </package>



If I use menu to point to viewSimpleXYChart.html, the action is hit and the 
chart displayed in a blank page, however hitting the jsp with the ajax stuff 
does nothing (no error traces), actions execute() method is simply not accessed.



Also I thought the following would work from a normal appfuse jsp page



<img:image src="/viewSimpleXYChart.html"/>



But it seems to be the same problem. I am sure I am missing something 
fundamentally simple here. The action will generate the chart as png, and the 
getChart method place it on the value stack and the references in the jsp get it 
from there and display it in the <s:div section ? I intend using this type of 
ajax method for a dashboard using Jfreecharts.



Thanks

Travers



--
http://raibledesigns.com

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to