cancel
Showing results for 
Search instead for 
Did you mean: 

Access BSP pages through dropdown values

Former Member
0 Kudos

Hi,

I have a created a dropdown in a webdyn pro application. Now, when I select any value from dropdown in first iView, then an BSP iView should open. I am able to pass dropdown values from first to second iView. But how to link BSP iView to dropdown values and open them?

Can anybody help me in this case?

Regards,

Vaibhav

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Vaibhav,

if you want to open an iView over a selectbox in web dynpro i would do the following steps:

- look into Content Administration into your portal you have created your iView and look after your iView path in the details (something like pcd:/portal_content/...)

- write down the following code in your web dynpro application for your selectbox:

if (Menuevalue.equalsIgnoreCase("<your value>")){

// call your iView

String url_iView = "ROLES://portal_content/<your path to your iView>";

WDPortalNavigation.navigateAbsolute(

url_iView,

WDPortalNavigationMode.SHOW_EXTERNAL,

WDPortalNavigationHistoryMode.NO_DUPLICATIONS,"");

}

In my case i do it for an ITS iView and it works fine.

Regards,

Frank

Former Member
0 Kudos

Hi Frank,

Will try this and let you know.

Former Member
0 Kudos

Hi,

Now am able to open an iView. But, I am not able to open in the second iView. I mean even I set <b>WDPortalNavigationMode.SHOW_INPLACE</b>, it is opening in different window.

Can you help me in this case?

Former Member
0 Kudos

Well, in this case, I would try it like that:

I would create two web dynpro applications. One application ist linked to your bsp iView, the other web dynpro calls the other application with portal eventing. Look at the link for a good code example for portal eventing and decide if it is a good solution for you or not.

http://help.sap.com/saphelp_nw04/helpdata/en/cf/18721b4079334cac4a3bd3862b185b/frameset.htm

Hope, that helps.

Regards,

Frank

Former Member
0 Kudos

Hi,

I have already creation two WD application as per the example given by you and it is working fine. But, I am not able to open the BSP in second iView's content iView.

I select some value in dropdown fisrt WD application(First iView) --> corresponding to that value one BSP iView path is selected and passed to another WD application (SecondiView) ---> In second iView, BSP path is used to open it <b>WDPortalNavigation.navigateAbsolute(dataObject, WDPortalNavigationMode.SHOW_INPLACE, WDPortalNavigationHistoryMode.NO_DUPLICATIONS,"");</b>. But, instead opening of in same iView content area, it is opening in new window.

So, Can we dynamically changes iViews in a page?

Former Member
0 Kudos

Perhaps it is a better idea to use an iFrame Element in your web dynpro. In this ui element there is a parameter existing (source) where you can point to a context element where you can define an url.

Try it and tell me if it works.

Regards,

Frank

Former Member
0 Kudos

Its throwing an error when I give ""ROLES://portal_content/<your path to your iView>";" kind of link.

Former Member
0 Kudos

Try this:

String PORTAL_BASE="http://<host portal>:<port>/irj/servlet/prt/portal/prtroot/");

String url2="pcd:portal_content/<your iView path>";

String encodedLocation = url2.replaceAll(":","!3a");

encodedLoacation = encodedLocation.replaceAll("/","!2f");

wdContext.currentContextElement.setUrl(PORTAL_BASE+encodedLocation);

//where Url is mapped as Context Element for the parameter source to your iFrame.

in my case, it works.

Regards,

Frank

Former Member
0 Kudos

Thanks a lot Frank. The problem is solved.

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Vaibhav,

I need some help.

You said you have implemented a dropdown in your form.

I also need a dropdown which will show the values from a column (in a Table).

Can you please post the code for the same.

Shall be grateful to you.

Regards

Nikhil Bansal

Former Member
0 Kudos

Hi Nikhil,

For now am hard coding drop down value. I created a node "Dropdown" with value attribute named as "element" and binded that node to dropdownbyIndex UI element.

String[] ddValueMode = {"one","Two","Three","Four"};

wdContext.nodeDropdown().moveFirst();

IPrivateEventSenderComponentView.IDropdownNode ddNode = wdContext.nodeDropdown();

IPrivateEventSenderComponentView.IDropdownElement eleDDnode;

for(int i = 0; i < ddValueMode.length; i++)

{

eleDDnode = wdContext.nodeDropdown().createDropdownElement();

eleDDnode.setElements(ddValueMode<i>);

ddNode.addElement(eleDDnode);

}