• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Javascript method reinitialising applet

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I have an applet inside a jsf page and I access its methods through javaScript.
when I try to call a method using a button inside the applet it works fine, but when I try to call the method through a javaScript it runs the code but reinitializes the applet, so I loose my data. The javascript method is wrapping the applet method scan() to be able to access the scanner.

How can I prevent the javascript from reinitilizing the applet?


public void javaScriptScan() {
AccessController.doPrivileged(new PrivilegedAction<Void>() {
public Void run() {
scan();
return null;
}
});
}
 
Ghita Benkirane
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Sorry, the problem was not related to the applet, but to the jsf page containing the applet.
Problem solved
 
reply
    Bookmark Topic Watch Topic
  • New Topic