Skip to Main Content

APEX

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Setting home page in post authentication process (SSO)

Elena IvanovaNov 19 2019 — edited Nov 20 2019

Hi Everyone,

Oracle 11 g

APEX 4.2.2

The application is designed for users of different departments / locations of the company, e.g. Australia, New Zealand and Head Office. I'm trying to dynamically set up a home page based on where the user belongs to. The authentication type is SSO, so I've defined the following code in PL/SQL section (see below) and calling the procedure in section. This solution is not working unfortunately... Please, let me know what I'm doing wrong.

PROCEDURE set_home_page

AS

   v_user_home_page VARCHAR2(3);

BEGIN   

    v_user_home_page :=

    CASE

        WHEN APEX_UTIL.PUBLIC_CHECK_AUTHORIZATION ('Head Office')

            THEN '1'

        WHEN APEX_UTIL.PUBLIC_CHECK_AUTHORIZATION ('Australia')

            THEN '2'       

        WHEN APEX_UTIL.PUBLIC_CHECK_AUTHORIZATION ('New Zealand')

            THEN '3'

        ELSE '1'

    END;

-- Not sure about this bit ??? --

    APEX_APPLICATION.G_HOME_LINK := v_user_home_page;

END;

This post has been answered by fac586 on Nov 20 2019
Jump to Answer

Comments

Philip Sommer

Hello User_A45QN,

Can you explain why you reload the page and set a bunch of classes on startup? This should not be necessary in my opinion.
How do you handle navigation between the tab pages. Have you set up modules as in the cookbook?
JET Developer Cookbook (0 Bytes)
Kind Regards,
Philip

Zeta411

Sorry, that legacy code I had for Android which is working fine in.
For IOS, On tab change listener, this is the code I have

if (map) {
onMapInit(map);

In the onMapInit, I am setting the markers. I can see that the onMapInit is completed successfully after which the self.connected() is fired at which point the tab is blank. The map is not displayed.
I tried adding plugin.google.maps.event.trigger(map, 'resize'); after onMapInit, it didn't help.
I am not navigating to other pages here, just switching between the tabs.

John JB Brock-Oracle

Try moving this code to the onTransitionCompleted() method and see if that helps. You can't guarantee that all DOM is available and rendered until after that lifecycle method is called.

Zeta411

Thanks for the reply John.
The TransitionCompleted method is not getting called in my code. The following are the debug messages from the table change listener.
--------------------------------
tabChangeListener() invoked ==> maps
tabChangeListener() Event is MAPS oj-offcanvas-outer-wrapper oj-offcanvas-page
tabChangeListener() mapDiv 37.785834 -122.406417
screen.width ==> 414
onMapInit() invoked --> [object Object]
mapInit completed.
Camera animate changed.
location is : 37.785834 , -122.406417
Camera animate changed in marker completeed.

----------------------
You can see that the onMapInit() is completed successfully.

User_A45QN
Answer

I had some legacy code that was working for android. After I removed it, the tab switching started working

Marked as Answer by User_A45QN · Sep 24 2022
1 - 5

Post Details

Added on Nov 19 2019
4 comments
332 views