Thanx Johan for reply, "Cant you do something with a shared resource and then push a bit more data in the url? "
After i read your suggestion, i tried to study more into DynamicImageResource, BufferedDynamicImageResource,Image class.. Still, I unable to get what do you mean by "push a bit more data in the url" .. Can you please show me some example on how to amend it? I really did crack my head on that but yet still couldn't get the solution, the image broken link still exist..it is my nightmare.. While searching and trying to get the solution for this, i saw this link: http://cwiki.apache.org/WICKET/how-to-create-dynamic-image-overlays.html This is to create the nodes for a tress, and the nodes will be overlay, do you think this could help? Is there anywhere for me to trace what data is currently been add to Resource? Plz... Eunice Johan Compagner wrote: > > It is the nature of the browser that loads the images of a page after > the page itself is loaded. > > Cant you do something with a shared resource and then push a bit more > data in the url? > > On 1/16/08, Eunice <[EMAIL PROTECTED]> wrote: >> >> Hai, >> >> I am trying to develop an application that going to display several >> charts >> in 1 page. The coding as below: >> >> >> public class JFreeChartImage extends Image { >> >> private int width; >> private int height; >> public JFreeChartImage(String id, JFreeChart chart, int width, >> int >> height){ >> super(id, new Model(chart)); >> >> this.width = width; >> this.height = height; >> } >> >> @Override >> protected Resource getImageResource() { >> >> return new DynamicImageResource(){ >> @Override >> protected byte[] getImageData() { >> >> JFreeChart chart = >> (JFreeChart)getModelObject(); >> >> return >> toImageData(chart.createBufferedImage(width, >> height)); >> } >> >> @Override >> protected void setHeaders(WebResponse response) { >> >> if (isCacheable()) { >> super.setHeaders(response); >> } else { >> response.setHeader("Pragma", "no-cache"); >> response.setHeader("Cache-Control", >> "no-cache"); >> response.setDateHeader("Expires", 0); >> >> } >> } >> }; >> >> } >> >> } >> >> >> while this i am loading Page A , i failed to load Page B from my >> application >> in different tab , where Page B is also consist of different charts, it >> shows page expired or sometimes show broken link icon. >> >> For Page A, coding for Page A will be exeuted, then will get the >> JFreeChartImage class to invoke the getImageResource() method but not the >> getImageData(). --> Lead to broken link >> >> For Page B, Coding for page B will be executed, then will get the >> JFreeChartImage class to invoke the getImageResource()and finally the >> getImageData(). >> >> Is it because the chart for Page A in getImageResource() that loaded >> earlier >> been override by Charts from Page B, if yes how can I fix this in order >> to >> show the charts for both page? >> >> Is this the nature of getImageData that only will in invoke after loading >> all other pages? >> Is anyone face this issue before? Pls help.. >> >> >> Thanx alot.. >> >> -- >> View this message in context: >> http://www.nabble.com/Broken-link-when-trying-to-navigate-to-other-page-with-another-tab-while-1-page-is-still-loading-tp14876728p14876728.html >> Sent from the Wicket - 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/Broken-link-when-trying-to-navigate-to-other-page-with-another-tab-while-1-page-is-still-loading-tp14876728p14967110.html Sent from the Wicket - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
