Skip to Content
author's profile photo Former Member
Former Member

How would/should you invoke a javascriptable applet from WDA or WDJ?

The background to this question is here:

OK - finally a bioinformatic coding problem that may not be so easy ...

The question is as follows.

Suppose you have a javascriptable applet - that is, an applet whose behavior can be tailored by passing it certain parameters from javascript.

What would the best way be to invoke the javascript from WDA or WDJ, assuming that you wanted to "pop" the applet in a separate HTML frame within tne WDA or WDJ application?

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Jul 22, 2008 at 06:20 AM

    Hi David,

    Jmol appears to be a very mature and well thought through library from my first glance.

    The main question that must be answered is if the entire application will be running within a SAP NetWeaver Portal .

    If it is (something which I would recommend), then you can use the SAP NetWeaver client side eventing framework to do most of the work for you.

    Basically in the Jmol viewer iView you set up a listener for a certain namespace and event. This listener is connected to a javascript method. From the WD application you fire a client side event through with the necessary data as parameter. This event reaches the JMol viewer iView listener, which against triggers a javascript method that dynamically alters the page so that the applet is shown.

    I would implement the Jmol viewer iView as a portal component consisting primarily of a JSP. However, you could also use apache, IIS and other web servers, but the host name (of the URL) must be in the same domain as the WD application and portal (due to javascript domain security policy).

    It would:

    • In the JSP setup a listener for a namespace and event as defined in the iView properties (in this way you can easily have several viewers on the same page which listen to different events)

    • In the JSP create a javascript method which is called when the event above is received. It will use the Jmol.js javascript library to create/alter the Jmol applet (see

    (if you need this portal component, let me know and I'll whip something up for you)

    For references see:

    (documentation for WDJ, but I assume the same applies to WDA. Would surprise me a lot if it didn't)

    Must be investigated:

    • Is there a limit for the amount of data being passed through the client side eventing framework

    (assume it is at least 64KB)

    If it is not to be access through a portal context, I need to investigate a bit more as I am not sure that WD applications can call arbitrary javascript functions.



    Add a comment
    10|10000 characters needed characters exceeded

    • Anton -

      First, I'm glad to see that this "dual view app" can be coded at the portal level the way mroe or less along the lines that Bob Hanson of JMol has suggested - with applets running in two view/rotate frames and WDA running in a "driver" frame. So thank's for verifying "doability" here.

      Second, I think someone at SAP should be paying close attention to this discussion (and your comments about the limitations of WDA/WDJ), because the "dual view" bioinformatic problem we're talking about here is exactly parallel to a "dual view" problem that crops up all the time in standard ERP MM "Interchangeability and Substitutability" - giving the customer the ability to view/rotate pictures of two components in MARA to see whether there any "gotchas" that make them not completely interchangeable (see my blog post here WDA, WDJ, or Either for Interactive Integration with 3-Dimension Visualizaton Tools on this parallelism.)

      So even though we're talking in this thread about some weird-ass bioinformatic problem, we're actually also talking about a problem intimately related to SAP core business.

      And if you're correct that SAP has "boxed itself in" with respect to how it could handle the weird bioinformatic problem, then it has also "boxed itself in" with respect to how it can meet what seems to be a reasonable customer expectation in ERP MM.

      Now maybe SAP will just say - hey - rotate-capability is not really that important - the user can link out to drawings or pictures and that should be "good enough:"

      But I personally think that would be a very "head in the sand" attitude that goes against what SAP claims it is trying to do with NW7.0 and future releases of NW.


  • author's profile photo Former Member
    Former Member
    Posted on Jul 22, 2008 at 09:12 AM

    So you want to load a html page containing your applet inside an iframe on the WD page?

    I guess you could pass the data in as url parameters and have the javascript on the embedded page read them using regexes on window.location.href.


    Add a comment
    10|10000 characters needed characters exceeded

    • Gregor -

      Thanks so much for taking the time to reply.

      Please see my response to Dagfinn - where I mention your post.

      As I said in that response, I hope that you are correct about it being possible to have a WDA application pass parameters to an applet and have the applet execute in an ifreame without benefit of portal.

      Best regards


  • Posted on Jul 22, 2008 at 02:59 PM

    Thanks to Dagfinn and Gregor, this project is now on its way!!

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.