cancel
Showing results for 
Search instead for 
Did you mean: 

If WDA will be able to call a Flash island, and Flash can call javascript

Former Member
0 Kudos

In this thread here:

Thomas said that an upcoming release of WDA will let WDA call Flash "islands".

Since this link:

http://www.adobe.com/devnet/flash/articles/external_interface.html

says that Flash can invoke javascript, won't it be possible for WDA to call an applet indirectly by calling Flash and letting Flash call the applet ?

djh

Accepted Solutions (0)

Answers (5)

Answers (5)

former_member181923
Active Participant
0 Kudos

Anton -

At another site:

http://www.artima.com/forums/flat.jsp?forum=1&thread=235563

someone suggested this work-around:


You could use the ExternalInterface.call("javascriptFunction", arg1, arg2) from the 
Flash object to call Javascript and next setup a javascript function that passes 
the arguments to the Applet object. Works the other way around too with 
Javascript relaying the arguments. 

Is this correct?

Thanks

djh

Former Member
0 Kudos

errm,

yes and no. 'obviously' you need some 'glue-language' to allow flash and java to communicate and this usually were javascript. WERE! - unfortunately, as I already mentioned several times, you can't embed anything not under the framework's(WD) control and of course this includes arbitrary javascript.

your turn.

anton

former_member181923
Active Participant
0 Kudos

OK -

That's what I needed clarification on - the rule as to what can/can't be embedded.

Your phrase "not under WD control" seems to be the correct way to state it.

Well, at least there will be "unsupported" WD iframes, even though I realize this solution does not satisfy your own personal criteria for sufficient interactivity.

Thanks again for the clarification.

djh

former_member181923
Active Participant
0 Kudos

Anton -

When you have a chance, see discussion with Thomas here:

former_member181923
Active Participant
0 Kudos

Anton -

I asked Thomas Stout to describe exactly what he's doing with Flex and JMol, and I'm posting his response just to be sure that there is no way (other than the portal) of duplicating what he is doing using WDA.

Here's his response:


Backend (linux):
- we have a "database" of crystal structures in flat-file directories (for example, 
weekly rsync's from the PDB)

- we parse those with perl scripts into an XML table with tagged data that we 
feel is relevant

Flex:
- the Flex app is constructed to load that XML file and display the data in a 
table.  We exported that code from Flex into an HTML table, which provided 
the basic page with a Flash movie of the Flex app embedded (See the attached 
screenshot from a development version of our web page: it's the horizontal 
rectangle at the top of the page).

webpage:
- we then built of the Jmol functionality into the lower half of this web page.  The 
table entries at the top are sortable on any column and filterable via the text 
box.  Once a line in the table is selected, the "Load" button passes the 
accompanying structure to the Jmol applet and all of the Jmol "tools" become 
active in the lower half of the page.   There is no communication in the reverse 
direction (can't think of why you would want to!).

- BTW, the web page does not use "frames" -- I'm personally opposed to them -- 
but it is all constructed within a table.  The Flash movie is in a table cell that 
spans two columns, the Jmol app is down a row and in the left hand (wider) cell, 
while the selectable links on the right are all in the right-hand cell.  The page is 
an amusing gmisch of HTML, javascript and JmolScript all fighting it out 
together.....    :)

Former Member
0 Kudos

hi,

translated into tech talk this means that he constructs a webpage like this


<HTML>
  <HEAD>
    <TITLE>my bio page</TITLE>
  </HEAD>
  <BODY>
    <TABLE>
      <TR><TD>
        <!-- upper half of the page: here goes the flex app like follows -->
        <object width="550" height="400">
          <param name="movie" value="somefilename.swf">
          <embed src="somefilename.swf" width="550" height="400">
          </embed>
        </object>
      </TD></TR>
      <TR><TD>
        <!-- lower half of the page: here goes the java applet like follows -->
        <Applet Code="TheApplet.class" width=42 Height=68>
           <Param Name=aParameter Value="007"> 
        </Applet>
      </TD></TR>
    </TABLE>
  </BODY>
</HTML>

now, you don't have to understand it in detail, but look at the code. the upper part of the table embeds a swf movie, i.e. a flex application. this piece of code is generated by dragging some flex item onto the layout window in WD designer. so, we have the first half our task.

the lower part contains the java applet. and this is the problem. you can't drag any java object in the web dynpro design tools and you can't directly manipulate the HTML code. effectively this means you can't embed the java applet, which in turn means you can't communicate with it.

and this is the WD problem.

former_member181923
Active Participant
0 Kudos

Hi Anton -

Thanks very much for being a good (patient) teacher. Actually, this is the way I like to learn new stuff - jump right into the middle without knowing anything at all.

What bothers me most about this limitation in WDA is this: Thomas Stout's example above is exactly parallel to my ERP example of a user selecting a BOM component from a tree UI element in WDA and passing its name to an app that shows a rotatable 3D view of this component.

Surely SAP should have the ability to do this without having to go up to the portal to do it, and without writing their own 3D "rotater", which would be ridiculous.

Anyway, thanks again. (I notice you're ignoring my question about Coding Problem 6 ...)

Best regards

djh

Former Member
0 Kudos

>

>(I notice you're ignoring my question about Coding Problem 6 ...)

no I don't. Just forgot. I suggest you pray for a rainy evening or, if required, such a weekend, to get your solution done. because on mild summer evenings like this I orefer to ride my bike through the nature or chill in a biergarten somewhere in town. )

cheers,

anton

former_member181923
Active Participant
0 Kudos

Wow - you mean you really might eventually do it? Believe me, if that's the case, I am prepared to wait.

I think you'd like my friend Bill Mann a lot - he's the guy that did a lot of these regex parsing things for me in PERL, except that his job was a little easier because we were running the batch version of the BLAST tool against our own database, so he didn't have to worry about HTML - he just had the stuff coming back from BLAST in flat text files. ((Of course, he couldn't do the interactive stuff that I'm asking you to do, i.e. to script the various "hops" from the various "hotspots.")

Anyway, the reason I think you'd like Bill is that he values good wine and good company as much as he values good caves for spelunking. If he didn't have to work occasionally, I doubt he would.

Best as always

djh

former_member181923
Active Participant
0 Kudos

Hi Anton -

Here's what I don't understand about your reply.

In one of the other two threads currently on this page, Thomas (Jung) said that in the very near future, WD-ABAP will support Adobe Flash/Flex "islands" (as well as silverlight) - I know you saw this comment, because you poked a little fun at it.

So if Thomas Stout (see above post in this thread) has successfully called the JMol Java applet from a Flex component and passed all requirements to the applet, why can't WD-A call the same kind of Flex component that Thomas Stout coded, and then have this Flex component talk to the Java applet itself????

Best

djh

Former Member
0 Kudos

because for the flex component to talk to anything this anything has to be present in the page.

so the html page (the thing WDA produces and the browser interprets) has to contain something like


<Applet Code="TheApplet.class" width=42 Height=68>
  <Param Name=aParameter Value="007"> 
</Applet>

otherwise there is no applet to talk to.

now, it isn't possible to get the piece of code shown into the HTML page! Therefore there is no applet present and that is why you can't talk to it.

former_member181923
Active Participant
0 Kudos

Well, if you're correct (and I'm sure you are), then that's crazy.

Why should Thomas Stout's "matrix" web application (whatever it is) be able to invoke a Flex component that talks to a Java applet, but in our case, our "matrix" WDA application can't do the same thing?

Seems to me that SAP is imposing a restriction on the "flexibility" of Flex ...

Anyway, if you're correct, then I'll just have to bump the interaction to the portal, where the WDA can invoke the Java applet directly via "client-side eventing". (I think that's what someone called it in one of the other threads.

Thanks very much again for taking the time to tease this one out. I really appreciate it.

djh

PS - what about the regex HTML parsing problem (problem 6) that I've posted on this page? I know you CAN do it ... what will it take to get you TO do it?

former_member181923
Active Participant
0 Kudos

Over at the Jmol-users list-server here:

https://sourceforge.net/mail/?group_id=23629

I received this response from Thomas Stout (don't know his affiliation):

Well, we have deployed an internal web page that feeds data to Jmol applets

from a Flex app*, which is rendered to HTML as a Flash "movie", so I think

the answer to your question is yes, although we have not attempted to embed

Jmol within the Flash component itself.....

-Tom

  • It reads our database of structures (in XML) and presents them for user

sorting and selection, then loads the selection(s) into Jmol for viewing and

analysis....

If he can do this from aweb-page and if WDA will be able to call a Flash/Flex app, then it seems that the answer to the question is "yes".

So - I can reach the applet from WDA indirectly - I don't have to elevate matters

to the portal.

Anyone see any potential problems ?

djh

Former Member
0 Kudos

hi dj,

unfortunately I do not have the time to describe all problems challenges in detail but there are two major obstacles I see without any detailed analysis (to reveal further obstacles or two elaborate on the two to follow)

  • security restrictions of Java applets | Flash applications | WDA; each of these technologies features its security concepts to avoid cross domain scripting, access to local ressources and so on....to get them to work together might turn out to be difficult if not impossible

  • if there were no other problem there would still remain the problem that you simply cannot embed any Java Applet into a WD page at all. you can neither add the simple HTML snippet required (since ypou can't code HTML at all in WD) nor is there an official mechanism to embed a Java applet or any other 3rd party 'control'

technically, the Java Applet simply has to be referenced with some HTML 'commands' in the final page resulting from some WDA 'scripting' but this is not possible

anyone is more than welcome to correct me here if I am talking crap or if there is a known workaround but AFAIK said issues are the matter of the fact.

anton