cancel
Showing results for 
Search instead for 
Did you mean: 

AppIntegrator - HTTPRenderLayer ScriptIncludes

Former Member
0 Kudos

hello,

i am using EP60 SP1. i've downloaded and installed the Application Integrator component and used it to create iViews for accessing a web-based application in the intranet.

what i'd like to do is to add some scripting to the contents returned by this intranet web app. i read in the app integrator doc that i can include java scripts to the document returned by the web app. specifically, the HTTPRenderLayer as a property called ScriptIncludes, which takes a comma delimited list of java script file names.

i have two questions regarding the ScriptIncludes property.

#1 where do i set this property? it is NOT exposed in the iView that i created based on the application integrator component. do i have to create my own app integrator component, where i also define a HTTPRenderLayer and specify the java scripts in its properties file? do i need to create my own layer as well?

#2 where is the java scripts specified in ScriptIncludes property inserted in the resulting html document? if the intranet web app returns a html document that also includes java scripts, then will the scripts in ScriptIncludes be included BEFORE or AFTER these java scripts?

thanks much.

wentao

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Wentao,

I am trying to integrate my iView with the application Integrator. I have written an iView that builds a table. The table contains hyperlinks to a LotusNotes server. When the user clicks on the Hyperlink then he should be single signed on to the server if he is already user mapped. In EP5 we used Always teah to accomplish this.

Seems like I will have to integrate the Application Integrator iview (Generic component) with my iView.

I had a look at the application Integrator par files. I could look at the Portalapp.xml. I do not have access to the class com.sapportals.portal.sapapplication.SAPApplicationIntegratorComponent

how did you build your own par file? Can you shed some light on this?

Thanks

Lakshmi

Former Member
0 Kudos

hello Lakshmi,

in the previous posts, i forgot to mention another very useful source of information on app integrator. i think it is part of the pdk for ep6. anyway, i found it through the Java Development/Documentation/, then i think Services. look there for app integrator. it has a section on Defining Your Own Application Integrator Component. sorry that i can't be exactly sure since my server just went down.

for your specific question on building a par. i use Eclipse with PDK plugin. the steps i took are something like the following:

-Create a Portal Application Project. this is part of the eclipse plugin. this will create the folder structures and the portalapp.xml file for you.

-create my portal component for iview, by copying the lines for the 'Generic' component in the portalapp.xml for the sap app integrator. here i add and remove properties as fit. so later the iview i create from this component has the desired properties, for example the ScriptIncludes property.

-follow the instruction in Defining Your Own Application Integrator Component and add my own starter class (which extends from com.sapportals.portal.appintegrator.AbstractIntegratorComponent). this is an empty class, so is the class com.sapportals.portal.sapapplication.SAPApplicationIntegratorComponent. so there is really no need to look at the sap class' source :-).

-i copy the layer property files, for example, SSOLayer.properties, ConnectionLayer.proerties and HTTPRenderLayer.properties, into my portal project. this way, i can again control the parameters etc.

-for ScriptIncludes to work, i also create my javascript files and place them under the dist/scripts/ dir in my portal project.

-now i simply Export the Par file from within Eclipse. i select to deploy PAR to my portal during the export.

this is it for creating par. next is to create iview from my component in the par.

another point you may be interested in is Cross Navigation. from your description, it seems like you need, from the link in your table, to navigate to your (app integrator) iview for lotus notes. cross-navigation will allow you to construct the url to a particular iview or page on the portal.

hope the above helps.

Former Member
0 Kudos

Hi Wentao,

Thanks for your reply. I will play around with the app integrator API and will let you know how it goes.

Thanks

lakshmi

Former Member
0 Kudos

Hi Wentao,

Your posts seems pretty helpful for the people who are using web integrator.

I have one doubt , hope you will solve it.

how can i integrate my r/3 system using application integrator.

Thanks & Regards

Deepak

Former Member
0 Kudos

well, guess not many people are using the app integrator. wonder why...:-)

i did make some progress. there are two key points for me.

a) implement my own component upon which the iview is based, instead of using the 'com.sap.portal.appintegrator.sap.Generic' as described in the doc. this way, i have total cotrol over which properties to expose to the iview level. this is pretty easy. it only involves creating the portalapp.xml file, which is mostly copied and pasted from the sap one for Generic.

b) implement my own app integrator as well. this is not too hard either. i re-use all the layer code shipped by sap. then i can decide which layers i want to use and the order of calling them. it is worth a whole lot to look at and understand the two par files from sap:

com.sap.portal.appintegrator.sap.par and

com.sap.portal.appintegrator.par

you can find them on the machine where j2ee engine is installed. look under ...\cluster\server\services\servlet_jsp\work\jspTemp\irj\root\WEB-INF\deployment\temp\. they are renamed with a .bak extension at the end. in eclipse, you can create a portal app from the .par file.

anyway, here are the answers to my original questions.

#1 the ScriptIncludes property on the HTTPRenderLayer can be set in the iview property. but the catch is, you must define a property by the same name for the iview. this is where a) in the above comes in. the Generic component from sap doesn't have such a property. also, for the script to be actually included, you must place the scripts themselves under a 'scripts' directory in your portal app. this requires creating your own app integrator components as described in b) above.

#2 js scripts included in the page through ScriptIncludes property are placed in the resulting html document BEFORE any js returned by the external web app. if you want to add some js scripts AFTER those returned by external web app, you have to add a layer after HTTPRenderLayer and include the js scripts to the response object.

hope this is useful for someone else out there.

wentao