Re: WebClient and Javascript

Greg Bowyer <[email protected]> Tue, 03 Jul 2007 17:55:45 +0100
Newsgroups gmane.comp.mozilla.devel.java
Message-ID <468A7F91.7080503__16705.5553211414$1183482024$gmane$org@fastmail.co.uk>
Julien1311 wrote:
Ah sorry, really should check things before I speak, I didn't realise 
that the project was back to life as of 2007

The Link error is a result of JNI attempting to load a native library, 
there is some error in talking to native / C code which is causing 
things to fail.

Having a look through the sources it appears that the C++ method in 
question (nativeSetPrompt) has been commented out (which would explain 
what you are seeing)

http://lxr.mozilla.org/mozilla/source/java/webclient/src_moz/NavigationImpl.cpp#308

> Thank you for answering.
> 
> First of all, I don't understand why you write that the blackwood project is
> pretty old since the last version of Webclient was released the 29 June,
> 2007.
> 
> The problem with alert / confirm is that they don't display. I have a button
> which is supposed to trigger an alert but nothing happens (my javascript is
> good since the page works with Firefox).
> There is an interface in the WebClient package, the 'Prompt' interface, and
> I think I should implement it. The problem is that the method setPrompt(),
> which must be called before using the Prompt interface, launch an error :
> 
> "Exception in thread "main" java.lang.UnsatisfiedLinkError:
> org.mozilla.webclient.impl.wrapper_native.NavigationImpl.nativeSetPrompt(ILorg/mozilla/webclient/Prompt;)V
> 	at
> org.mozilla.webclient.impl.wrapper_native.NavigationImpl.nativeSetPrompt(Native
> Method)
> 	at
> org.mozilla.webclient.impl.wrapper_native.NavigationImpl.setPrompt(NavigationImpl.java:178)
> 	at ISWebBrowser.initialisation(ISWebBrowser.java:79)
> 	at ISWebBrowser.<init>(ISWebBrowser.java:38)
> 	at ISWebClient.main(ISWebClient.java:33)"
> 
> I don't understand what that error means.
> The javadoc of WebClient is available 
> http://www.mozilla.org/projects/blackwood/webclient/spec_compliant_api/index.html
> here .
> 
> I hope somebody could help me.
> 
> 
> 
> Greg Bowyer wrote:
>> The blackwood stuff is pretty old, and as far as I know not supported 
>> anymore.
>>
>> Whats the problem you are experiancing with alert / confirm, simply not 
>> working, or something more critical. You will probably need to implement 
>> nsIPromptService and a factory for it to handle alert / confirm yourself.
>>
>> Julien1311 wrote:
>>> Hello everybody,
>>>
>>> I am trying to use WebClient (
>>> http://www.mozilla.org/projects/blackwood/webclient/
>>> http://www.mozilla.org/projects/blackwood/webclient/ ) to embed a browser
>>> into a Java application.
>>> I managed to create the frame with the browser and to display a HTML
>>> page.
>>> However, I have some problems with a HTML page with Javascript. All my
>>> Javascript scripts work except those which are supposed to open a dialog
>>> box
>>> (with the methods 'alert()' or 'confirm()'). I don't know where this
>>> problem
>>> comes from.
>>> I really need your help, it's been a week that I'm trying to make this
>>> work
>>> with no success.
>>>
>>> Thanks for your help
>>>
>>> Julien
>> _______________________________________________
>> dev-tech-java mailing list
>> [email protected]
>> https://lists.mozilla.org/listinfo/dev-tech-java
>>
>>
>