Re: Updating image inside zone
No, I think I solved the problem by adding fake context to the chart component. I think the problem was that browser cached the image with src="someurl" (because the chart is ultimately just an html img. By adding "random" data (our context) to the url we prevent the image from caching (this is my guess). -- View this message in context: http://tapestry.1045711.n5.nabble.com/Updating-image-inside-zone-tp5716498p5716503.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Updating image inside zone
Maybe your component jfreechart:jpegchart caches the datas. 2012/9/26 ch_pasha > Yes I can > > > tml wrote > > > > ${execution.id} > > > > > > > > > > > chart="chart" > > width="850" height="600"/> > > > > > > java wrote > > @InjectComponent > > private Zone chartZone; > > > > @OnEvent(value = "showChart") > > Object onShowChart(RestwertExecution execution) { > > this.execution = execution; > > return httpRequest.isXHR() ? chartZone.getBody() : null; > > } > > > > > > public JFreeChart getChart() { > > return new MyChart().generate(dao.loadSomeData()); > > } > > As I said, I see that zone is updated (there are also log entries for > dao.loadSomeData() every time). but the getChart() method is never called > again and chart content is obviously the same > > > > > -- > View this message in context: > http://tapestry.1045711.n5.nabble.com/Updating-image-inside-zone-tp5716498p5716500.html > Sent from the Tapestry - User mailing list archive at Nabble.com. > > - > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org > For additional commands, e-mail: users-h...@tapestry.apache.org > >
Re: Updating image inside zone
Yes I can tml wrote > > ${execution.id} > > > > >chart="chart" > width="850" height="600"/> > java wrote > @InjectComponent > private Zone chartZone; > > @OnEvent(value = "showChart") > Object onShowChart(RestwertExecution execution) { > this.execution = execution; > return httpRequest.isXHR() ? chartZone.getBody() : null; > } > > > public JFreeChart getChart() { > return new MyChart().generate(dao.loadSomeData()); > } As I said, I see that zone is updated (there are also log entries for dao.loadSomeData() every time). but the getChart() method is never called again and chart content is obviously the same -- View this message in context: http://tapestry.1045711.n5.nabble.com/Updating-image-inside-zone-tp5716498p5716500.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Updating image inside zone
Can you provide the code when performing zone update? On 26 September 2012 11:50, ch_pasha wrote: > Hi all, > > I have an image with dynamic content inside zone component (jfreechart > actually). Unfortunately when triggering the zone update image content is > never updated - getter method returning streamresponse is called only once > when the page is first loaded but never again,when zone is updated. Is it an > expected behaviour? How can I make the image populate content each time zone > is updated? > > > > > > -- > View this message in context: > http://tapestry.1045711.n5.nabble.com/Updating-image-inside-zone-tp5716498.html > Sent from the Tapestry - User mailing list archive at Nabble.com. > > - > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org > For additional commands, e-mail: users-h...@tapestry.apache.org > - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Updating image inside zone
Hi all, I have an image with dynamic content inside zone component (jfreechart actually). Unfortunately when triggering the zone update image content is never updated - getter method returning streamresponse is called only once when the page is first loaded but never again,when zone is updated. Is it an expected behaviour? How can I make the image populate content each time zone is updated? -- View this message in context: http://tapestry.1045711.n5.nabble.com/Updating-image-inside-zone-tp5716498.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org