Thread: Passing parameters into an application


Permlink Replies: 11 - Pages: 1 - Last Post: Jan 3, 2007 5:43 AM Last Post By: Danny Roach
Danny Roach

Posts: 63
Registered: 09/08/06
Passing parameters into an application
Posted: Jan 2, 2007 3:39 AM
Click to report abuse...   Click to reply to this thread Reply
I have a main page in my application that is a report. This report can display 3 different subsets of data depending on a parameter passed to it.

My question is:

When I call this report from within an iframe is it possible to pass the parameter? The application is an sso partner application and is being accessed through portal so the sso server should have already authenticated the user.

Do I have to pass a session value when passing parameters? As when the page is first called there will be no session and thus a new one will need to be created.

Thanks.
jonbarwell

Posts: 73
Registered: 09/21/05
Re: Passing parameters into an application
Posted: Jan 2, 2007 3:53 AM   in response to: Danny Roach in response to: Danny Roach
Click to report abuse...   Click to reply to this thread Reply
The easiest way I have done this is to create a hidden field for your parameter which can then be easily passed in your "f?p" URL string. Your report can be developed as a "SQL Query (PL/SQL function body returning SQL query)" to return different results sets based on the parameter.

If you have completely different reports with different columns then use Generic column names which you can format labels for using PL/SQL to return the label names based on your hidden field.
Danny Roach

Posts: 63
Registered: 09/08/06
Re: Passing parameters into an application
Posted: Jan 2, 2007 4:07 AM   in response to: jonbarwell in response to: jonbarwell
Click to report abuse...   Click to reply to this thread Reply
My report is the same columns just different subsets of data depending on the parameter passed. The bit I am having problems with now is the session. The first time the app is called in the iframe there is no session set and the iframe refuses to navigate to the page with the parameter added (it is fine without the parameter or if a valid session is included in the url). I believe there is an api for setting the session, does anyone have any experience of using this?

Thanks.
sspadafo

Posts: 16,581
Registered: 01/10/01
Re: Passing parameters into an application
Posted: Jan 2, 2007 10:07 PM   in response to: Danny Roach in response to: Danny Roach
Click to report abuse...   Click to reply to this thread Reply
Danny - What version of Application Express are you using? When you request the fist page (and how do you do this?) do you get redirected to the SSO login page?

Scott
Danny Roach

Posts: 63
Registered: 09/08/06
Re: Passing parameters into an application
Posted: Jan 3, 2007 12:57 AM   in response to: sspadafo in response to: sspadafo
Click to report abuse...   Click to reply to this thread Reply
Hi Scott

I am using apex 2.2

I am trying to navigate to page 2 of my app. I made a mistake yesterday, it works fine when you try to open the app in the iframe the first time you navigate to the host page (i.e. the one with the iframe on it), it redirects you to the sso login page, you sign in, no problem.

Thereafter if you try to navigate to the host page it gives you a this page cannot be displayed error in the iframe.
sspadafo

Posts: 16,581
Registered: 01/10/01
Re: Passing parameters into an application
Posted: Jan 3, 2007 1:21 AM   in response to: Danny Roach in response to: Danny Roach
Click to report abuse...   Click to reply to this thread Reply
Okay, you need to determine the exact request that gives the error using the access log and the nature of the error using the error log.

Scott
Danny Roach

Posts: 63
Registered: 09/08/06
Re: Passing parameters into an application
Posted: Jan 3, 2007 1:34 AM   in response to: sspadafo in response to: sspadafo
Click to report abuse...   Click to reply to this thread Reply
Scott, where can i find these logs? I am quite new to application express and have not had to do this before.

Thanks.

Danny
sspadafo

Posts: 16,581
Registered: 01/10/01
Re: Passing parameters into an application
Posted: Jan 3, 2007 2:09 AM   in response to: Danny Roach in response to: Danny Roach
Click to report abuse...   Click to reply to this thread Reply
Sorry, I mean the Apache access and error logs. The first will give info about the request and the second about the error.

Scott
Danny Roach

Posts: 63
Registered: 09/08/06
Re: Passing parameters into an application
Posted: Jan 3, 2007 2:43 AM   in response to: sspadafo in response to: sspadafo
Click to report abuse...   Click to reply to this thread Reply
Hi Scott

Thanks for that. I have never looked at these logs before but I have included the entries below in case you may be able to help?

error log

[Wed Jan 3 02:36:05 2007] [error] [client 192.168.197.1] [ecid: 1167820564:192.168.197.100:1568:0:90,0] mod_plsql: /pls/orasso/orasso.wwsso_app_Admin.ls_login HTTP-404 ORA-06502: PL/SQL: numeric or value error\nORA-06512: at "ORASSO.WWSSO_LS_PRIVATE", line 870\nORA-06512: at "ORASSO.WWSSO_VPD_PRIVATE", line 41\nORA-06512: at "ORASSO.WPG_SESSION", line 66\nORA-06512: at line 22\n

access log

192.168.197.1 - PUBLIC [03/Jan/2007:02:36:05 -0800] "GET /pls/orasso/orasso.wwsso_app_Admin.ls_login?site2pstoretoken=v1.2%7E9BC43B23%7ED0B01801FE12FDB5651F70ADD4C118DAAD6CB7847D4CF266F288A915CAEDE271CA6E1CE0E791926B82C7CDA72AD2A01F0FEDE8FC156F821802F240830C49E59BFAE5A1D1A93902E32DC86E6A7CA183B70F81AB108F32C5E0F9C719E8BB93193B67AB01A16C0E3C75F7FB524A09C5DF5DF6443D51026177D7885A45D0D13E8177AED5152C09151FEF3B3258D5F3302D9498D1884145B2615936F58E730D0A1F82E4240BAF24A5E5A0CF72A619D2CAC2E8BE4CD5B9BB6D10EE6817E32B6CF8080F4C2AD3FE1B13566847F9A3A6F0463CD31CCC70E8B997D2ECE9D54CA31337D69DBB3E36E83510E80A6E696FBDC6A92EC1E62C55A1CD0562C66604CBB397384D563C2FAF5AAB48491E0B3BB469B7AC5150 HTTP/1.1" 404 377

Again I connected to the portal and navigated to the page containing the iframe. I was prompted for sso login inside the iframe (even though I am already logged in through sso for the portal). I entered my credentials and it logged in and worked fine.

However as soon as I refreshed the portal page (containing the iframe) i got the 'The page cannot be found' error message.

Thanks.
sspadafo

Posts: 16,581
Registered: 01/10/01
Re: Passing parameters into an application
Posted: Jan 3, 2007 2:54 AM   in response to: Danny Roach in response to: Danny Roach
Click to report abuse...   Click to reply to this thread Reply
Sorry to say this but you're going to need someone with direct access to all the resources at your site and with knowledge of Portal, SSO, Application Express, and perhaps fly fishing to investigate the situation and try to debug it.

Scott
Danny Roach

Posts: 63
Registered: 09/08/06
Re: Passing parameters into an application
Posted: Jan 3, 2007 3:35 AM   in response to: sspadafo in response to: sspadafo
Click to report abuse...   Click to reply to this thread Reply
Well thanks for looking at it anyway. If I find out what is causing it I will post it, fyi.

Danny
Danny Roach

Posts: 63
Registered: 09/08/06
Re: Passing parameters into an application
Posted: Jan 3, 2007 5:43 AM   in response to: Danny Roach in response to: Danny Roach
Click to report abuse...   Click to reply to this thread Reply
Okay I have a little more information on this now. The problem lies in the sso session. I think when you access an application through an iframe it treats everything in the iframe as if it were in a separate browser session. This means that when you try to access the application in the iframe it still redirects you to the sso server even though you are already authenticated via portal.

So this is the problem, has anyone got any ideas on what the solution might be?
Legend
Guru Guru : 2500 - 1000000 pts
Expert Expert : 1000 - 2499 pts
Pro Pro : 500 - 999 pts
Journeyman Journeyman : 200 - 499 pts
Newbie Newbie : 0 - 199 pts
Oracle ACE Director
Oracle ACE Member
Oracle Employee ACE
Helpful Answer (5 pts)
Correct Answer (10 pts)

Point your RSS reader here for a feed of the latest messages in all forums