cancel
Showing results for 
Search instead for 
Did you mean: 

IFrame in WDJ application to call another WDJ iview based on users country

Former Member
0 Kudos

Hi All,

I have a requirement wherein I have to display an iview based on the logged in user's country. This iview will be displayed within a WPC ivew. So the idea is to create just one WPC iview and put this WDJ iview in it, hence if a user from US logs in and sees this WPC ivew ..he will see US specific WDJ iview & if a user from UK logs in and sees this same WPC iview.. he will see UK specific....same should be the case for all other countries.

I was exploring option and using IFrames can help me acheving the same, but on further research I found it deprecated and also when I write IWDIFrame. in nwds i get "The type IWDIFrame is deprecated"

My SAP Portal is 7.01 & NWDS version is 7.0.11

Any pointers to achieve my requirement would be of great help.

Regards,

JJ

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

closing this thread.

0 Kudos

Hi Joshi,

Create 3 WDJ Iviews

1. MAIN Iview

2. US Content

3. UK Contetnt

I n main Iview Identify Users Country then use portal navigation to show the country based content in same window.

No Need to Use IFrame.

If(UserCountry==US){

Portal Navigation(US IView);

}else if(UserCountry==UK){

Portal Navigation(Uk IView);

}

Regards,

Narayana Kodavati.

Former Member
0 Kudos

Thanks Narayan.

I went ahead with your advice, and I got the navigation working BUT the iview opens in a new window.

I need:

MAIN iview is within a WPC webpage --> when we open wpc --> need to get eg. US iview exactly in place of MAIN

What is happing:

MAIN iview is within a WPC webpage --> when we open wpc --> US iview is open in another portal window & the wpc area were I have placed MAIN is blank.

I am using following code:

if (wdContext.currentContextElement().getVa_usercountry() != "" && wdContext.currentContextElement().getVa_usercountry() != null) {

if (wdContext.currentContextElement().getVa_usercountry().equals("US")) {

WDPortalNavigation.navigateAbsolute("ROLES://portal_content/hr/emea/iviews/ess/personal_information/com.emea.ess.ivu.addr_ir",

WDPortalNavigationMode.SHOW_INPLACE,

WDPortalNavigationHistoryMode.NO_HISTORY,

"");

}

}

Any advice to resolve this....I think I am almost there but need some more push !!

Thanks.

JJ

0 Kudos

Hi Joshi,

USe Relative Navigation and see

(or)

Please check for Iview Properties.

1. Launch in New Window--Display in portal contetn area.

2. Show 'Open in New Window' Option--No

Regards,

Narayana Kodavati

Edited by: narayana kodavati on Sep 19, 2011 7:52 AM

Former Member
0 Kudos

Hi,

Thanks for your reply. But I tried this options (using relative, chking iview properties to display in content area, etc) and none gave me the required results.

So, now I have developed an abstract portal component and used iframe in response.write....something like this:

if (country == "US")

response.write("<iframe....src='my WD iview url' </iframe>") ;

And this gives me exact results, it opens an iview within wpc.

Thanks for all the inputs.

-JJ

Former Member
0 Kudos

Gurus any inputs/pointer/questions ?

Thanks,

-JJ

Edited by: JJoshi on Sep 15, 2011 4:15 PM

Former Member
0 Kudos

From what I hear IWDIFrame is deprecated but that deprecation has been removed in the later versions of web dynpro. So feel free to use it whenever possible. It is not removed in new versions.