cancel
Showing results for 
Search instead for 
Did you mean: 

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

Former Member
0 Kudos

The background to this question is here:

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?

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

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 WDPortalEventing.fire(...) 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 http://jmol.sourceforge.net/jslibrary/)

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

For references see:

http://help.sap.com/saphelp_nw04s/helpdata/en/79/3857422d095542e10000000a1550b0/frameset.htm

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

https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/a3c57e19-0d01-0010-ad8b-9edde6d1...

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.

Regards

Dagfinn

former_member181923
Active Participant
0 Kudos

Dagfinn -

Thank you so much for such a detailed and informative response.

It makes me wish I was 40 years younger and 40 IQ points smarter, so that I would have the time to learn everything I need to know and smarts to apply it correctly.

Your suggestion that portalling might have to be involved tells me that the NW7.0 subscription stack may not be enough to do what I want to do - I might have to give-in and buy a Discovery system (I think this comes with portalling capability.)

On the other hand, Gregor seems to think that WDA can pass parameters to an applet and have the applet put its results in an oframe without need for a portal. (Not sure if I said this correctly ???)

If so, that would be better for me at the moment because: a) less to learn; b) I could develop a WDA prototype even if a solution along your lines is ultimately preferable.

Best regards

djh

Former Member
0 Kudos

Hi David,

Saw some of your post on the bioinformatics site (RCSB) and I am quite sure you have no problems on the IQ side

Gregor's suggestion is definitively a possible solution that should be investigated if a portal doesn't exist today.

Two iframes (one the main application and one viewer) in the same domain (in the url) are allowed to call javascript methods in each other's context. This is baiscally what the SAP NetWeaver Portal client side eventing framework does. For normal web applications this would be easy to implement, but for WebDynpro there are some limitations since Webdynpro in principle is a model based tool independent of view technology.

Because of this HTML and Javascript specific commands are not allowed within a WebDynpro application, which means you cannot implement the simplest solution outlined above. A quote from https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/a3c57e19-0d01-0010-ad8b-9edde6d1...

"... it is not possible to add JavaScript coding to a Web Dynpro application"

What webdynpro does support however, is to include iframes inside a WebDynpro application. From a WebDynpro side an iframe has one primary attribute and the is the src URL. In the URL you can add querystring parameters that represent the object to be viewed. The source attribute should be able to be modified from the WebDynpro application and you can therefore send data to the viewer based on data in the WebDynpro application.

You still have to implement the viewer on top of a web technology and WD is not suitable for this. Since you have a ABAP stack, BSP is suitable.

(you could also write everything in a plain .html file with javascript if you want to avoid BSP).

The major question with regards to passing the data through the url in a querystring is if it allows enough data to be passed.

After some investigation it seems that approx 2KB is the max limit for IE, see http://www.boutell.com/newfaq/misc/urllength.html

Can all your data models fit within this ? I doubt it.

The standard web technolgy alternative when you want to large amounts of data is HTTP POST. Unfortunately, you cannot use HTTP POST either since WD uses an Iframe and is independent of view technology.

Another alternative could be to pass the data in a HTTP cookie, but this is limited at 4KB, ref http://support.microsoft.com/?id=306070. Also I am also not sure if it is possible to set a cookie from WD.

To sum up, it is possible to integrate a viewer with WD without a portal, but you are limited in the size of data you are able to transfer.

Regards

Dagfinn

former_member181923
Active Participant
0 Kudos

Dagfinn -

OK - now I'm getting excited!

Here's why.

My actual "agenda" is as follows (in order from broadest to most specific goals):

1) Convince SAP to market NW7.0 as an empty "soup-to-nuts" (database-to-web) IDE - no applications at all - just the development environment;

2) Convince SAP to start thinking about penetrating the vertical "bioinformatics" sector - SAP has a lot of pharma clients already and some of them might be very interested in a stable supported bioinformatics platform that reaches out to integrate with all the great open-source bioinformatics software that is constantly being developed;

3) Convince SAP that by considering problems in the bioinformatic sector, it can come up with interesting enhancements to its core product (e.g. the dual 3D view/rotate application has obvious applications in material management, as per my blog post that you noticed.)

4)a Create an SAP "application" that will allow me to automate a lot of the very laborious work that I now have to do by hand to produce the material in the StrucClues "case library" here:

http://strucclue.ornl.gov

4)b. Generalize this SAP application so that it's useful to other bioinformatic researchers who are not pursuing the theoretical approach that I'm taking at the StrucClues site.

Without the info you and Gregor have provided, I would only know how to get half the job done - design of the relevant database tables, WDA routines for search/seleciton of the database, "batch" programs for indexing the database in useful ways, etc.

I wouldn't know how to do the web side - the interaction with other bioinformatics software that I need.

And unless I can produce a prototype SAP application, I doubt that I will make much progress in achieving the "broad" goals (1-3) above.

So, to sum up, although this is still a very informal SDN "collaboration" among you, Anton, Gregor, and me (with Craig and Mark behind the scenes, of course), it is proving tremendously useful and productive.

Oh - and one other thing: if you personally don't agree with any of the goals (agenda items) listed above, I hope that won't stop you from continuing to help out in the way that you already have.

very best regards

djh

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

>

>What webdynpro does support however, is to include iframes inside a WebDynpro application.

Actually the iFrames UI element is depreciated and should not be used any longer.

http://help.sap.com/saphelp_nw70/helpdata/EN/15/c07941601b1d09e10000000a155106/frameset.htm

So for now the approach suggested to use mutiple iViews in the portal and Portal Eventing is the primary suggestion that would come from SAP regardless of WDA or WDJ.

The future holds some new possibilities. In the upcoming Enhancement Package 1 for 7.0, Web Dynpro gains the new Flash Islands UI element. The whole concept of Islands is that you can have areas of high interactivity embedded directly within Web Dynpro. You can have seamless events and data binding between these areas implemented in various technologies and the core Web Dynpro. The WD framework takes care of all the translation and communication - keeping the application developer from having to worry about it (or having to dip into JavaScript or anything like that).

Now we probably aren't going to use this framework for Applets. Instead we are looking to the future. The first Islands that comes with EnhP1 will host Adobe Flash (Flex Components). Later in 2009 we will also add support of Microsoft Silverlight.

Long term this is the best solution for the situation you describe - because you get tight integration, yet retain the client independence and ease of use of Web Dynpro.

former_member181923
Active Participant
0 Kudos

Hi Thomas -

Darn it! My hopes arose, only to be crushed.

In any event, I want to thank you for taking the time to contribute and clarify here, despite the "bad" news you brings.

Some obvious questions:

1) I'm assuming portal capability doesn't come with the NW7.0 subscription stack. Right?

2) When will the 1st Enhancment ship?

3) Will it be possible to apply it to the subscription stack?

4) Can MS Silver Light or Adobe Flex call a Java applet and render its results in a flash applet (including interactivity, e.g. rotate capability in the case of a 3D viewer applet?)

If answer to (4) is yes, then maybe the news isn't so bad, depending on the answer to 3.

Again, thanks very much for taking the time to step in here.

Best regards

djh

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

>

> Hi Thomas -

>

> Darn it! My hopes arose, only to be crushed.

>

> In any event, I want to thank you for taking the time to contribute and clarify here, despite the "bad" news you brings.

>

> Some obvious questions:

>

> 1) I'm assuming portal capability doesn't come with the NW7.0 subscription stack. Right?

>

> 2) When will the 1st Enhancment ship?

>

> 3) Will it be possible to apply it to the subscription stack?

>

> 4) Can MS Silver Light or Adobe Flex call a Java applet and render its results in a flash applet (including interactivity, e.g. rotate capability in the case of a 3D viewer applet?)

>

> If answer to (4) is yes, then maybe the news isn't so bad, depending on the answer to 3.

>

> Again, thanks very much for taking the time to step in here.

>

> Best regards

> djh

1. I'm not positive, but I though the subscription came with everything NetWeaver. I would be a little suprised if the Portal wasn't included.

2. EnhP1 for NetWeaver 7.0 starts ramp-up within a few weeks and is scheduled for General Availability in Q4. EnhP1 for NetWeaver CE Ramp-Up is scheduled for Q4.

3. Perhaps someone who is familiar with the rules of the subscription program will have to answer that. You should be able to download the EnhPs from the Service Marketplace (via your subscription account) and apply them. They are sized and are applied more like a support package - not a full upgrade.

4. Don't know - you would have to ask a Flex or Silverlight coder. They might know some deep trick. I don't think that would be something very common. I think moving forward you would expect to see Rich content no longer being delivered as Applets or ActiveX - but Flash/Flex and Silverlight instead.

former_member181923
Active Participant
0 Kudos

Yes - you're correct, Thomas. I just checked with the guy who installed my subscription stack, Portal can be installed from the distribution disk. So I just have to wait until I can get a bigger machine ....

Once I have:

a) gotten a bigger machine;

b) installed portal;

c) learned how to "portal" (particularly the client-side eventing business)

the consensus here seems to be that I can do my interaction with the database within one iframe of the portal (via a WDA application) and then pass parms obtained in this iframe to the iframe that will invoke an applet with the passed parms.

Is that a true, albeit oversimplified, statement.

If so, then at least I know what I have to get/learn/do in order to realize what I have in mind.

Thanks very much again.

djh

Former Member
0 Kudos

Thanks Thomas for your input on what the future brings and that the iframe ui element is deprecated (didn't really make sense to have it here if you want to be as UI technology independent as possible). Your mentor hands-on blog about the new UI technology () is on my TODO list and hopefully I will have time soon to see it

With regards to your question 4 David

>4) Can MS Silver Light or Adobe Flex call a Java applet and render its results in a flash applet

I haven't heard of any framework in Adobe which encapsulates Java applets and I think this is unlikely to happen. It is also not very probable that viewer applications such as Jmol are ported to MS SilverLight or Adobe Flex by others since the application is "rooted" in the science community which has always been very java/open-source friendly.

A core assumption from my point of view was that the bio informatics data was already stored in a structured format in SAP.

From your latest response, I get the feeling that it resides in a database outside SAP.

If that is the case, I am not sure about what value SAP adds to the solution architecture. Sure WD is a nice model driven technology, but you might as well use an open-source Java web container (tomcat, JBoss), php or .NET along with various UI libraries to quickly create such an application. All these with virtually no more cost than the server itself.

What benefit do you see David from adding SAP in the mix?

Regards

Dagfinn

former_member181923
Active Participant
0 Kudos

Yes - Dagfinn - all relevant bioinformatic data will be stored in SAP - either as the basic raw data or as links to where a piece of data is in the "standard" public databases (plus a specification of a routine for any tailoring, if needed.) (Sometimes it's better to put the raw data inside SAP - sometimes it's better to link out to its source, even if you have to "tailor" the returned data so that it's exactly as you want it.)

For example, this would include the "coordinate data" that drives the mol viewer applets. Either SAP will have coordinate data, or it will have links specifying where to get the coordinate data (i.e. a PDB ID, a chain ID, and start/end residue numbers.)

What shouldn't be done in SAP (I think) are specialized functions such as using coordinate data to produce a rotatable 3D image. Why reinvent this wheel when there are so many good viewers out there? Will SAP put a 3D view/rotate feature in MM, or will it wait for Documentum or Maximo to do it? I doubt SAP will write its own, but if it does, then I agree - put something similar inside SAP for this as well.

Another example would be statistical routines. For the 10,000 t-tests and 10,000 normality tests that needed to be done to produce the "gold-standard" data at http://strucclue.ornl.gov, my colleague called the STATA statistical package in batch mode. So why put specialized stat routines in SAP?

So, to sum up

a) all data and/or data addresses will be in SAP;

b) all data analysis will be done inside SAP, supported by outside calls as the need arises

c) all final presentation will be done via SAP.

The advantage of this approach is ease of integration and maintainabilty from the database all the way up to the web.

Why should I worry about interfacing perl with Oracle when I can just define transparent tables in SAP, write WDA and ABAP against them, and if need be, RFC out to specialized routines?

Similarly, if you look at the documents that make up any "case" in the "case library" here:

http://strucclue.ornl.gov

you'll see that all these various documents can be stored as attachments to a type of business object that I define within SAP, making retrieval and presentation very easy.

I hope the above makes my thinking clearer - if I'm still not expressing the advantages clearly, please let me know and I'll try again.

Best regards

djh

Former Member
0 Kudos

Much clearer now

Btw. I'll try to participate in your community day session on this topic, but given the wealth of other interesting session I might not be able to prioritize it.

If that is the case, we can meet up in the clubhouse later during the week for discussions.

Cheers

Dagfinn

Former Member
0 Kudos

>

> Now we probably aren't going to use this framework for Applets. Instead we are looking to the future.

lol.

so Java Applets are the past and Flash and Silverlight are the future?

To me Flash is sooo old and tried it so many times to get a serious foot into web technologies and always failed (apart from the annoying blinking commercials and often too bad 'video gamelets') that it is to be considered the technology furthest away from the future. Silverlight? Let's see. but after all it's MS who more then once admitted that they completely missed any webtechnology trends.

my 2 cents. anton

former_member181923
Active Participant
0 Kudos

Anton -

Glad to see you contributing again!

Well, your original comment about RasMol shamed me into doing some research into molecular viewers callable as applets.

Here are the latest responses I've gotten from Angel Herraez at Jmol. (You might find it fun to join the Jmol project at SourceForge and also subscribe to its jmol-users list-server.)

I told Angel that here's what I want to do:

> 1) we're in Frame1 of a portal that has two other frames in it: FrameA and

> FrameB.

>

> 2) A query in Frame1 against a certain database brings back two sets of

> specifications for Jmol, say:

>

> a 1hru, A, 123-145

> b) 2eqa, A, 144-167

>

> 3) Via "client-side eventing" at the portal level , the portal passes the

> parameters in (a) to JMol and Jmol runs in FrameA to display the "partial"

> structure view requested (with rotate capability, same as in interactive

> JMol;

>

> 4) At the same time , the portal passes the parameters in (b) to JMol and

> Jmol runs in FrameB to display the "partial" structure view requested (with

> rotate capability, same as in interactive JMol;

>

> Is this scenario currently possible as JMol is currently written?

He then responded:

As long as you have already set the means to communicate with the

Jmol applets in your portal system, I think it is indeed.

This is what I'd pass to Jmol in FrameA:

load "1hru.pdb"; display *:A and 123-145;

and this to jmol in FrameB:

load "2eqa.pdb"; display *:A and 144-167;

(you will have to adjust the loading of the pdb file depending on

where it is located)

"display" is a better choice than the alternative, "restrict", for

reason I won't discuss now (but we can separately, if you need it)

Depending on your ways of inserting Jmol into your frames, there may

be some details to solve, but on the Jmol scripting side that's all

needed.

> Or would I have to settle for the portal simply invoking Jmol in FrameB

> and again in FrameC and letting the user manipulate settings in the

> console, as you suggest.

No, I won't suggest so, you can indeed preprogram what you want.

I also asked him about capturing the views after rotating in each frame to get the desired view of each structure, and here's his response to that:

Yes, the views can be captured to the user's computer, in a web page

(e.g. popup window) from where the user can copy or save them to

disk, using the browser's capabilities.

If you need to "capture" to the server, I cannot say *but see below.

The discussion on how to make snapshots is quite long. There are

several mesages in the list some time ago and there are several

places that use this functionality; Bob has at least one, I dont0

remember exactly where right now, and I have a testpage/tutorial at

http://biomodel.uah.es/Jmol/export-image/index.htm

See if you can make it from that, then ask if you need help.

>From the screenshot, displayed inside the browser, you can save

directly to your disk in some browsers, or else copy-paste into any

image editing program (I would not recommend Powerpoint, as the

quality of saved images is poor). You get a jpeg file directly.

Now that I think of it, in fact all the trouble was getting the

server-generated image into the client browser, so there should be a

way to store the image in the server maybe.

Anyway, will you be in LasVegas?

If so, will you be at SDN Community Day?

If neither, do you have MS shareview ????

Anyway, I will be talking soon (this weekend) in the WIKI about "alignments" and how I have to use them to get the results at StrucClues (http://strucclue.ornl.gov).

This is where the really interesting and heavy regex-ing and returned html parsing is going to come in, so I hope you will remain interested long enough to solve the new propblems I am going to pose. They will be much more related to real scripting problems - I just wanted to get this "view/rotate" issue out of the way, so that I could do an honest job at my SDN Community Day Session.

Very best regards

djh

Former Member
0 Kudos

>

> So, to sum up

>

> a) all data and/or data addresses will be in SAP;

> b) all data analysis will be done inside SAP, supported by outside calls as the need arises

> c) all final presentation will be done via SAP.

>

> The advantage of this approach is ease of integration and maintainabilty from the database all the way up to the web.

either I am really misunfderstanding the whole discussion here or the statement 'ease of integration' is simply not applicable to your ideas.

I promise, your academic colleagues will grill you if you happen to succeed to sell em (current) Netweaver technologies for the project in question. I happen to have worked in science too and if I remember something at all it's the fact that you always want to integrate your favourite and expert analytical software package as good as possible. and i really want to see how you integrate your favourite bio statistics libraries with Netweaver.

and i'm not yet joking about your desperate solutions with seriously passing larger amounts of data as URL parameters to an isolated iView in a deprecated iView frame....

sorry if that was too bluntly. anton

former_member181923
Active Participant
0 Kudos

Anton -

Are we cross-posting?

In case we are, and you missed the end of my last post, here it is:

Anyway, will you be in LasVegas?

If so, will you be at SDN Community Day?

If neither, do you have MS shareview ????

Anyway, I will be talking soon (this weekend) in the WIKI about "alignments" and how I have to use them to get the results at StrucClues (http://strucclue.ornl.gov).

This is where the really interesting and heavy regex-ing and returned html parsing is going to come in, so I hope you will remain interested long enough to solve the new propblems I am going to pose. They will be much more related to real scripting problems - I just wanted to get this "view/rotate" issue out of the way, so that I could do an honest job at my SDN Community Day Session.

Very best regards

djh

Now, turning to the issues you're raising:

There are many reasons why I think you're wrong, Anton. The chief one being that academics are not the target - pharma is. And that's entirely different. Also, where do you see large amounts of data being passed as URL parms? I never indicated that would have to be done.

But the main one is something I learned in 1993 when I first worked with Temple Smith:

http://bmerc-www.bu.edu/bmerc_info/temple.html

(He's the guy who donated the 20000 sequences to StrucClues.)

When I discovered he was databasing in Sybase - I said - my God - why Sybase?

And he said:

Because someone picks up the phone when you call support. Quickly, too.

Something to think about, I think. Because he is one of the father's of dynamic programming in alignment, as well as the Smith-Waterman algorithm. So he's not someone who wants to rely on "pre-built" software. But when it comes to his data ... he wants supportability.

Best

djh

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

>

> >

>

> > Now we probably aren't going to use this framework for Applets. Instead we are looking to the future.

>

> lol.

> so Java Applets are the past and Flash and Silverlight are the future?

>

> To me Flash is sooo old and tried it so many times to get a serious foot into web technologies and always failed (apart from the annoying blinking commercials and often too bad 'video gamelets') that it is to be considered the technology furthest away from the future. Silverlight? Let's see. but after all it's MS who more then once admitted that they completely missed any webtechnology trends.

>

> my 2 cents. anton

Funny I had the same reaction to your comments. Are you saying that Java Applets are the future of Rich Internet Applications? Maybe you are holding out for JavaFX. If not Flash/Flex and Silverlight then what technologies do you see being used when HTML/JavaScript hit their limits? Flash always failed? I have some pretty strong objections to the statement that Flash/Flex has always failed. Not to start any kind of holy war here, but I think you are discounting Flex far too quickly. How can you honestly say that Flash/Flex is the technology furthest from the future - I just don't see that at all.

With the Islands Framework, SAP has built an abstraction layer that allows for a lot of different technologies to be plugged into it. And yes we did a fair amount of market research to determine the trends in RIA when deciding what technologies to allow to plug into Islands. And yes SAP does feel that Adobe Flash/Flex technology is well positioned to fill the gap of high interactivity that can't be acomplished with HTML/JavaScript alone. We also think that Microsoft will make nice inroads in this area in the near future as well which is why we will add Islands support for Silverlight in the future.

former_member181923
Active Participant
0 Kudos

Thomas -

So long as you're here, I wanted to mention that my young colleague here thinks that calling a Java applet from Flash/Flex would not be that "deep a trick".

He's keeping an eye on this thread, so maybe he'll chime in.

Best

djh

Former Member
0 Kudos

I actually kind of agree with Anton on the image Adobe Flash/Flex has in the market, but disagree on other points.

I've done some advanced actionscript coding related to games, and there are too many quirks and strange design choice in the language. To be fair to Adobe, I've never done any formal training, but I am not sure that would have helped a lot for this type of development.

However, the actual presentation of Flash applications is superior to other technologies and allows the 'wow' factor which subconsciously affect users (ie.buyers).

My 2 cents is that the strength of Flex/Flash shines through when you generate applications based on modeling. An excellent example of this is SAP Visual Composer which I am really impressed over.

Applets have traditionally had problems on the client side due to distribution and similar, and the trend on the Java side has long been a move to rich GUIs in Swing which are automatically started(and distributed) through Java Webstart.

I believe SAP is going in the right direction, but a lot will happen in this area in the years to come. Especially since the generation of UIs based on services is really where the ROI of SOA will come.

Regards

Dagfinn

Former Member
0 Kudos

>

Are you saying that Java Applets are the future of Rich Internet Applications?

Hi Thomas,

no I don't say that Java is the future but I think it is definitely wrong to dismiss Java Applets for the future and attribute them to the past. If there are any island like artifacts in todays browser based applications they are either Java applets or ActiveXs.

Flash always failed? I have some pretty strong objections to the statement that Flash/Flex has always failed.

IMHO Flash tries it since the middle of the 1990ies to get a market share in web applications and failed. most of the alternative UI elements in today's flash apps were already there at that time. I remember having been involved in projects around 2000 when people tried to render whole ecommerce solutions (shops) into flash. for several more or less well known reasons flash simply never ever made it. wouldn't there be SAP the last two or three years not many of us would care about flash at all.

don't get me wrong. nice animations in BI. nice graphics. pretty. but anything more interactive sucks. my opinion.

regards, anton

BTW, one of my favourite Flash Shops for almost 10 years now: [Balthaser|http://www.balthaser.com] . Guess how cool and advanced that shop was several years ago!

former_member181923
Active Participant
0 Kudos

Dagfinn and/or Thomas and/or Anton -

What is "Ajax?" And can the NW app server call it? Or does it already do what "Ajax" does when it comes to communicating with applets in portal frames ????

Reason I'm asking is that over at SourceForge, I gave them the scenario mentioned above:

> 1) we're in Frame1 of a portal that has two other frames in it: FrameA and

> FrameB.

> 2) A query in Frame1 against a certain database brings back two sets of

> specifications for Jmol, say:

> a 1hru, A, 123-145

> b) 2eqa, A, 144-167

> 3) Via "client-side eventing" at the portal level , the portal passes the

> parameters in (a) to JMol and Jmol runs in FrameA to display the "partial"

> structure view requested (with rotate capability, same as in interactive

> JMol;

> 4) At the same time , the portal passes the parameters in (b) to JMol and

> Jmol runs in FrameB to display the "partial" structure view requested (with

> rotate capability, same as in interactive JMol;

And Bob Hanson responded as follows:

If http://strucclue.ornl.gov/cases/spcl/1gtr1f7u.gif is an example of the

sort of thing you are interested in, but live, then you can do that in

about 15 minutes of programming with Jmol. This sort of thing is done all

the time. Definitely use Jmol.js to set up the two applets. It will take

about four lines of JavaScript.

If you know how to do it, using Ajax is the way to go for communicating

with your server. Just have the server send the Jmol script, and have the

page JavaScript deliver it to one or the other applet, as directed by the

server.

The script, as Angel has pointed out, is basically trivial. Just a load

command along with a few commands to generate the cartoon the way you want

it and to display just the part you are interested in.

You should consider using the SYNC command to allow mouse motion on one

applet to control the orientation of the other. This is very slick.

If the PDB files are not on your server you can either use the signed

applet, JmolAppletSigned.jar, or you can "relay" the structures through

your server and just use JmolApplet.jar, which is not signed.

Bob Hanson

I see what Bob is suggesting - instead of Frame 1 passing command line parms to Frame A and Frame B, Frame 1 simply tells the server that's it OK to pass certain parms to Frame A and Frame B, and then Bob's scenario takes over.

But what is the "Ajax" he mentions for communicating betwen the applets and the server?

Is this something that NW7.0 does differently?

Forgive my ignorance here - I work in Function Group exits and BAdI's, so this is all new territory to me (except for the standard WDA course I took last month.)

djh

Former Member
0 Kudos

AJAX is asynchronous javascript communication.

usually, on any event (clicking alink, buton or anything else) a request is made to the server and the result is a whole new (actual) page which is to be rendered at the client (browser).

AJAX allows you to call the server asynchronously (meaning the webpage at the client side remains functional during the call) and depending on the result update only parts of the webpage.

an example is google's search toolbar which returns you some search terms in the drop down as soon as you enter a few letters e.g halitsky when you only entered hali (actually you'Re not yet prominent enough that google's search bar really does )

hope it helps,

anton

btw: i am not in LV (unfortunately), i am not at community day and i don't have that program mentionend but I'll surely follow the feedback on your session here in the forums.

former_member181923
Active Participant
0 Kudos

Anton -

Thanks for the explanation. Really helpful.

Sorry to hear you wont' be in LV but glad to know you'll be looking in occasionally.

Also, as per my post above, when I start defining the really heavy regex html parsing problems down in the WIKI, I hope that you might still be willing to contribute some solutions, even though you are opposed to the whole direction on practical and theoretical grounds.

One last question - so it is possible that the same result as Ajax can be achieved with NW7.0 portal, either using Ajax or some native NW7.0 capability?

Best

djh

Former Member
0 Kudos

hi,

I am not opposed to the 'whole direction on practical and theoretical grounds' I just don't think it would work on current WD technologies, not because the technology couldn't be capabable to support such projects but because of delberate platform concepts which - simply said - do not allow to embed anything not under control of SAP. and I am not sure what the benefits of using Netweaver were...

if you want to have my objections formulated more positively: I wish SAP would allow more degrees of freedom in its platform to allow customers and consulting shops to build applications on it which constitute a real USP for the customer.

regaqrding your question

so it is possible that the same result as Ajax can be achieved with NW7.0 portal, either using Ajax or some native NW7.0 capability

well, ..with NW7.0 portal... is a bit generic. yes, I think you can, writing your own JSP pages, but you can't using SAPs presentation technologies like WDJ(because you can't embed your own javascript into WD).

anton

former_member181923
Active Participant
0 Kudos

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 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.

djh

Answers (2)

Answers (2)

former_member181923
Active Participant
0 Kudos

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

Former Member
0 Kudos

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.

cheers

former_member181923
Active Participant
0 Kudos

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

djh