call a javascript extension

Hey

I am very new to Blackberry/Java development if any help would be great.

Using the tutorial on how to create blackberry javascript extensions that I wrote a very simple extension that will download a file from you.  Everything seems fine, I can export the JAR but I get the following in eclipse warning:

Description Resource Path Location Type
Signing Required: RIM Blackberry Apps API (0x52424200): Import uses protected Class net.rim.device.api.web.WidgetConfig ByteReaderExtension.java /TribalWorksByteReader-OS6/src/tribal line 5 BlackBerry Protected API

When I try to use the extension to javascript in my application webworks, nothing happens.  Simply, it stops and does not receive from past the line, where I make my call.

alert("before extension call");
tribal.download.downloadFile(remoteFile, localFile);
alert("after extension call");

In the emulator, I get the first alert, but not the second.  I'm also a few calls from Dialog.alert in my extensions javascript that ever fire.  Kind of I'm stuck at this stage since there is no errors so I don't really know where to start.

Someone knows something similar or know how I can fix this?

Packer widget 1.5

OS: 6.0.0.337

Device: 9800

I am also to build my javascript extension nuer Blackberry JRE 6.0.0

Edit: I'm also compiling the application with bbwp.exe

Thank you!

Chris

I thought about it.

I used a file struggle to update the index.zip and compile it with bbwp.exe.

I forgot to add the ext for the zip folder.

Tags: BlackBerry Developers

Similar Questions

  • Widget Javascript Extension: reminder

    Hi guys,.

    I am currently developing widgets using Javascript Extension also.

    I am facing a problem.

    In my class that extends from ScriptableFunction, how do I manage an object passed to call methods as arguments and representing a "pointer" to the javascript function to use as the asynchronous callback?

    How can I call it?

    Thank you very much.

    Concerning

    Scarex

    Hi Scarex,

    It's a really great question.  You can execute JavaScript in Java by using the executedScript() method which accepts a string as a parameter.  Rather than pass a pointer to a JavaScript method, you can provide the name of the function as well as all the parameters.

    Here's an example of how you could spend two whole arguments to a ScriptableFunction and make a call to a JavaScript function named 'add', passing the following values:

    ScriptableFunction _myFunc = new ScriptableFunction()
    {
       public Object invoke(Object obj, Object[] args) throws Exception
       {
          if (args.length == 2) {
             int param1 = ((Integer)args[0]).intValue();
             int param2 = ((Integer)args[1]).intValue();
             _browserField.getScriptEngine().executeScript("add(" + param1 + ", " + param2 + ")", null);
          }
          return UNDEFINED;
       }
    };
    

    Here's what could resemble the method add() method JavaScript, defined in the BlackBerry Widget application web content:

    
    

    I hope this helps.

    Best wishes

    Adam

  • Error when you try to call the Javascript function in the ActiveX Web browser

    I have a requirement to call a Javascript function in a web page that is displayed in the browser's ActiveX control.  I have the control on the front panel, and I use the Navigate method to call to the top of the appropriate page.  Based on an example, I found, I'm trying to get a reference to the HTML Document so that I can then get a reference to the Fenetreparent.  There is a method of the HTML Window object called execScript who I'm calling.  See the attached image of the code (reference close calls do not appear, but when I run it, they are there).

    I can't the node property that returns the parentWindow reference.  The error I get is the following.

    Error-2147467262 LabVIEW: (Hex 0 x 80004002) No. taken such interface supported.

    Any ideas on where to go from here?

    Hello

    I have reproduced the issue and the error you are seen and tried to understand what is the solution.

    It seems that the problem is with getting the pointer to the parentWindow.  From what I read on MSDN, it's maybe a limitation in the use of an ActiveX control in LabVIEW. It seems like Internet Explorer creates the object of the window, and so opening in one ActiveX control you free access to this top-level object.

    Here could be workaround for javascript execution in your program:

    I would like to know if it works for you and if it will work in your program.

  • How to get the Javascript Extension written for Tablet Playbook/submit to App World

    WebWork SDK "TABLETS" documentation:

    https://developer.BlackBerry.com/HTML5/documentation/ww_release_notes/bb_webworks_sdk_tablets_rn_2.2...

    It shows that we can

    "use the JavaScript extensions-

    You can create JavaScript extensions to enhance your applications by adding them to archive the application before compiling the source of the application. You can modify and distribute these extensions. "

    However, even I can successfully test the extension on my local playbook in the folder "\BlackBerry WebWorks SDK for Tablet 2.2.0.5\bbwp\ext", I can't find doc showing what to do during the presentation of the app on the app store with my extension. WeBWorK for smartphone seems obvious because it uses the java & jar, but just can not find information about the expansion on tablet...

    The extension is integrated within your compiled cod or bar. you have nothing to do rather than download the bar or COD.

  • Flash cannot call the javascript function in the local html file

    Hello!

    Us is to develop our first application on Playbook. It is an html file including a flash file and javascript code. Everything is packed in. in the file bar, a config.xml file and has been correctly loaded into the Playbook. Everything works locally (no web access)

    Everything works well except when we use an ExternalInterface.call("saveglobalscore",score) in flash that calls a javascript function in the .html file.

    In the actionscript3, we selected the "authorized local file access" and put the 'Security.allowDomain("*) '.

    Any ideas? Thank you!

    External interface tries to access the files packaged locally is currently a known issue.  I have not really of a calendar when or if this can be resolved.  It may be in the code base of flash.

  • Call a Javascript function in a Captivate 7 Web page

    Hello

    I try to call a javascript function in a web page to Captivate 7. The call is an output of blade event. When I saw the (F4) project, I have a prompt that displays a javascript function is called and told me to display in a web page. Of course, which is perfectly logical. However, when I go to the same project in the hml with the necessary Javascript function in page, I get nothing. The script is a simple that displays an alert.

    I made sure the SWF in question is defined in the global security settings. I know that the javascript function is correctly formatted.

    Can someone please give me an example of how to "execute Javascript" call of Captivate to a function residing in the html page please.

    Any help is appreciated.

    Don't just add the SWF file to the Flash security locations overall of confidence.  Add the entire folder containing all the files published, or better still, a level that contains all your published Captivate projects so that you never have to worry about Flash security issues again.

    Also, if it still does not work, I would try the same running JavaScript with a different event than the event output slide.  It can be a little bit reliable.

  • Call from JavaScript to AS3 bar reading

    Platform: Captivate 7

    Source: AS3 (obvious, I hope!)

    Output: Flash v10

    I make a unique version of one of the default player bars.  I'm doing the Exit button call a JavaScript function using the following code:

    var btnTipsId = 8;

    function onClicked()

    {

    to import flash.external.ExternalInterface; //Register ExternalInterface

    ExternalInterface.call("saveglobalscore",score) ("closeModule ()"); //Call JS to close Div

    / / parent.onPBCBtnClick ("exit");

    }

    As you can probably see, I don't want to Exit button to close the module with the way she normally does.  My 'closeModule()' function removes a Div layer that hosts the Captivate.  I know it works as we use it in other places.  The problem I encounter is strictly in obtaining the PlayBar to call this JavaScript instead of its function by default 'parent.onPBCBtnClick ("exit");".

    Any ideas?

    Try calling closeModule without the parentheses:

    ExternalInterface.call("saveglobalscore",score) ("closeModule");

  • Call a javascript function in the Value attribute of param

    Hello

    I want to put a TLF text field in the SWF file in an HTML page. So I used flashvar, by calling a javascript function to it attribute "value" as follows.

    < param name = FlashVars value = "" + SetFlashMovieParam() + "" id = "message" / > "

    SetFlashMovieParam() is a javascript like the following function.

    function SetFlashMovieParam() {}

    document.getElementById("message").setAttribute ("value", "msgText = Start");

    }

    Even if this does not work, when I put the text value directly to the 'value' attribute, it worked.

    < param name = FlashVars value = "msgText = here % 20is % 20The % 20text" id = "message" / > "

    I think it's because calling a javascript function syntax error in the param tag. Can anyone help to call this function properly...

    Thank you.

    Normally when you have an executable code embedded in the html code you should check that article accordingly.  In the case of javascript surround you with

  • What controls available for javascript extensions?

    Hello

    I would like to know what controls are available for javascript extensions. I mean, that control can I put on a pdf page or nearby? I read the documentation and I hope I'm wrong, because I've heard they can be put in a dialog box. Thanks in advance

    Controls that you can place on a page that can trigger the code are different types of form fields. You can also create custom for a document toolbar buttons.

  • How to call the javascript function in ADF

    I have the javascript function stored in a .js file external (try to reuse in another application). How can call the javascript function for an event of ADF faces component. I need to I am a newbie to ADF, all ideas are appreciated.

    Kind regards
    Surya

    Published by: sgodavar on Sep 24, 2010 11:44

    Include JavaScript to the jsff/jspx as page:

    Call it like:

    Type = "dblClick" / >
    Amit

  • Can LOV in report - I call a JavaScript on change?

    Hi I have a lov in a report. I want to do is call a JavaScript on the evolution of the value?

    is this possible?

    Thanks in advance

    Hello
    Just edit the column and put your onchange statement in the attributes of the element.
    Kind regards

  • Call the javascript function by hovering the mouse over the tab

    Hi all
    I have an application with a level tabs. I want to call a javascript function to the mouseover of the standard tab please help as soon as possible.

    Thanks in advance

    Hello

    Go to the page template and scroll the tab Standard attributes. In my current theme which has a line that looks like this...

    #TAB_LABEL##TAB_INLINE_EDIT#
    

    You could change this

    #TAB_LABEL##TAB_INLINE_EDIT#
    

    Or make reference to a function that you included in the header.

    Alternatively, you can make the same change to no current tab.

    Is that what you mean?

    See you soon

    Ben

    Published by: Munky on January 14, 2010 11:34

  • Call the javascript of customized phase listener method

    Hey guys,.
    I am currently integrating an ADF with another web application custom application, for this - I wrote a custom listener phase and in its afterPhase() I need to call a javascript method, which will proceed with a treatment for me. For icefaces, we have something like com.icesoft.faces.context.effects.JavascriptContext.addJavascriptCall (facesContext, jsmethod); but I couldn't find something similar here in BAA. Advice/suggestions will be appreciated!
    Thanks in advance.

    Hello user,.

    Import org.apache.myfaces.trinidad.render.ExtendedRenderKitService;
    Import org.apache.myfaces.trinidad.util.Service;

    ExtendedRenderKitService service is Service.getRenderKitService (FacesContext.getCurrentInstance (), ExtendedRenderKitService.class);.
    Script of StringBuilder = new StringBuilder();
    script. Append ("alert ('hello from phase listener ')");
    service.addScript (FacesContext.getCurrentInstance (), script.toString ());

    I hope that's what you're looking for

    concerning

  • app calls html/javascript kernel written in c / c ++

    Wonder if I can use html/javascript to call core application written in c / c++.

    I hope to put some entensive of calculation for the module written in c / c ++

    Is this possible?

    Welcome to any comment

    Hello. WebWorks for BB10 extensions are on the road ahead, and for now, there is an example of how to write a native extension with a JS source that will be used to the WebWorks app. See the discussion on the extension BB10 WebWorks, I've referenced the example in there.

  • GUI or Console output javascript extension

    While working at webworks I have user "alert" for the values of the variables and to control the flow of control.

    Now I started to write javascript in java extension

    but whenever I tried Dialog.alert ("message"); the extension projects working

    is it like the extension of javascript may not show any output GUI?

    If that's how I can see in the console?

    How can I check the values of variables?

    or whenever I click on a button I want to see that the id of the function being called correctly so I usually put alert()

    is there something that I can put inside the java classes or can print the output on console?

    He got so called DIalog.alert I have to do

    class Recording extends Thread{
    
        public void run(){
            UiApplication.getUiApplication().invokeAndWait(new Runnable() {
                    public void run() {
                       Dialog.inform("Thread started inside java and this is inside run");
                    }
                 });
        }
    }
    

Maybe you are looking for

  • ProBook 4320 s: driver missing

    Hello After the upgrade to windows Pro 10, my HP Probook s 4320 is missing this driver: ACPI\HPQ0004\3 & 21436425 & 0 If a person who I can use because windows 10 or the HP auto detect is nothing. Thank you.

  • Display screen when changing the programs problem

    I have a C670 - 17L and just recently I started having problems when switching between programs on the taskbar. Already when I used to click to change the programs screen of the selected program would open quickly. Now, it's much slower - it shows be

  • Satellite Pro 6100 restarts and hangs himself

    Hi, (Toshiba sp6100) Computer is invented to obey his orders to s user or orders but my laptop RESTARTS and HANGS itself without any intervention from the user. Such a weird problem, it is very EMBARRASSING as it does on the exploits above three time

  • Re: Qosmio G50 - 10I - I need the maintenance manual

    Hello Can tell me that someone that I can find a service manual(+ now how unscrew you the notbook +)+ I don't care warranty +)for my Qosmio g50 - 10iThank you

  • Recharge phone when it is connected to the PC

    Is it possible to charge my phone when it is connected to my PC?