xmlgraphics-batik-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pareshdahiwal <pareshdahi...@yahoo.com>
Subject Re: createSVGDocument() inside applet method not working in firefox
Date Mon, 03 Sep 2007 06:21:41 GMT

Please note that 'appletMethod()' I mentioned in earlier post is not
lifecycle method of applet but its an instance method with some name



pareshdahiwal wrote:
> 
> Hi,
> 	
> 	I am trying to load an svg file in the canvas using as 
> 	
> 	public appletMethod(String fileName) {
> 	
> 	byte[] fileData = ..... // I fetch this data from database blob field
> 	InputStream inputStream = new ByteArrayInputStream(fileData);
> 	BufferedInputStream bis = new BufferedInputStream(inputStream);
> 				
> 	String parser = XMLResourceDescriptor.getXMLParserClassName();
> 	SAXSVGDocumentFactory factory = new SAXSVGDocumentFactory(parser);
> 	
> 	SVGDocument document = SVGApplication.factory.createSVGDocument(null,
> bis);
> 	
> 	// svgCanvas is an instace of org.apache.batik.swing.JSVGCanvas
> 	svgCanvas.setDocument(document);
> 	
> 	}
> 	
> 	
> 	
> 	I have written javascript code calling this appletMethod().
> 	
> 	when I call this method from javascript FIRST-TIME it loads the
> respective svg file....but does not load on sub-sequent calls. 
> 	
> 	Also there are no exceptions on JAVA-console except one message "Cookie
> service is not available - use cache to determine "Cookie".
> 	
> 	I have noticed one thing that method svgLoadEventDispatchStarted() is
> getting called only at first time and not on sub-sequent calls.
> 	
> 	svgCanvas.addSVGLoadEventDispatcherListener(new
> SVGLoadEventDispatcherAdapter() {
> 		public void svgLoadEventDispatchStarted(SVGLoadEventDispatcherEvent e) { 
> 	          System.out.println("Loaded....");  
> 	      }
> 	}
> 	on Java-console I can see "Loaded...." printed on first call but not on
> sub-sequent calls.
> 	
> 	I am using JRE version 1.6.0_02, FireFox version 2.0.0.6, IE version
> 7.0.5730.11, batik version 1.6.
> 	
> 	I am really getting frustrated with this problem because my code works in
> IE but not in firefox.
> 	
> 	If anyone had come across such situation and/or have any suggestions,
> please help and/or suggest.
> 	
> 	Thanks in advance.
> 
> 

-- 
View this message in context: http://www.nabble.com/createSVGDocument%28%29-inside-applet-method-not-working-in-firefox-tf4360091.html#a12456924
Sent from the Batik - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: batik-users-help@xmlgraphics.apache.org


Mime
View raw message