Ajax chart service
I have a service that generates images for using jfreechart. I want to convert this service to ajax so that the chart image can load without reloading the whole page. I have played around with div's and updateComponent and ResponseBuilder. The ajax response seems to be generated but the image is never updated. What is the problem? Do I need to find a way to include Javascript to load the image via scripting? My ajax works for raw text but not for image services. -- View this message in context: http://www.nabble.com/Ajax-chart-service-tp16084794p16084794.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Ajax chart service
you need not ajax here, just change src of the image, first create an action link that can produce an image then use javascript to switch urls for the image... http://wiki.apache.org/tapestry/Tapestry5HowToCreatePieChartsInAPage Davor Hrg On Sun, Mar 16, 2008 at 11:07 PM, bioye [EMAIL PROTECTED] wrote: I have a service that generates images for using jfreechart. I want to convert this service to ajax so that the chart image can load without reloading the whole page. I have played around with div's and updateComponent and ResponseBuilder. The ajax response seems to be generated but the image is never updated. What is the problem? Do I need to find a way to include Javascript to load the image via scripting? My ajax works for raw text but not for image services. -- View this message in context: http://www.nabble.com/Ajax-chart-service-tp16084794p16084794.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Ajax chart service
IMHO you don't need AJAX for that, becuase AJAX require XML HTTP Request to client, you don't really need to do that in case you know how your image URL should looks like. For example if you implementing a zooming functionality you just need a javascrtip to select an area of the image, then you calculate (in javascript) coordinate of rendered graph (as subsect of original image) and just replace the image's URL inside javascript. That's all, browser will make a request to the server and refreshes the image.Basically it's something like document.getElementById('im').src='img1.jpg' I'm sure you will find a good replacement in Prototype for document.getElement Renat On 16/03/2008, bioye [EMAIL PROTECTED] wrote: I have a service that generates images for using jfreechart. I want to convert this service to ajax so that the chart image can load without reloading the whole page. I have played around with div's and updateComponent and ResponseBuilder. The ajax response seems to be generated but the image is never updated. What is the problem? Do I need to find a way to include Javascript to load the image via scripting? My ajax works for raw text but not for image services. -- View this message in context: http://www.nabble.com/Ajax-chart-service-tp16084794p16084794.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Best regards, Renat Zubairov
Re: Ajax chart service
I'm using T4? Will this work in tapestry 4.1.3. And if necessary, can you provide links or sample code on how to handle this in t4? Thanks. Davor Hrg wrote: you need not ajax here, just change src of the image, first create an action link that can produce an image then use javascript to switch urls for the image... http://wiki.apache.org/tapestry/Tapestry5HowToCreatePieChartsInAPage Davor Hrg On Sun, Mar 16, 2008 at 11:07 PM, bioye [EMAIL PROTECTED] wrote: I have a service that generates images for using jfreechart. I want to convert this service to ajax so that the chart image can load without reloading the whole page. I have played around with div's and updateComponent and ResponseBuilder. The ajax response seems to be generated but the image is never updated. What is the problem? Do I need to find a way to include Javascript to load the image via scripting? My ajax works for raw text but not for image services. -- View this message in context: http://www.nabble.com/Ajax-chart-service-tp16084794p16084794.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/Ajax-chart-service-tp16084794p16085295.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]