cancel
Showing results for 
Search instead for 
Did you mean: 

How to divert the two different view to two different url via url parameter

Former Member
0 Kudos

Hi All,

My scenerio is as follows:

I have one webdynpro project containing 2 views that is Add user and Edit user. Now in portal in my detailed navigation i want two links Add user and Edit user how can i achieve this. I would keep a default view which based on a url parameter get diverted to one of the views. I want to know where I can set the url parameters in the portal. Please help

Thankyou

Regards,

Preeti Kaur

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

Why dont you create two applications that point to each view and create iveiws for them.

Regards

Ayyapparaj

Former Member
0 Kudos

Hi Ayyapparaj,

Above it was told tht if you have two applications then you cants have two different detail navigation links but i need the two links. I know it is possible to do with one application but dont know the method.

Regards,

Preeti Kaur

Former Member
0 Kudos

Hi Preeti,

You could create 2 WD iviews in the Portal pointing to the same application. Use the property "Application Parameters" of the iviews to set any static value like "CREATE" or 'EDIT'. The parameter should be of the following format


mode=CREATE

Within the WD Java application you can use the following code to get the value of the Application Parameter:


String applicationMode = WDWebContextAdapter.getWebContextAdapter().getRequestParameter("mode");

Now once you have the parameter you can use the following piece of code to set the default view of your application:


IWDWindowInfo windowInfo = wdComponentAPI.getComponentInfo().findInWindows("<window name>");    
IWDViewUsageInfo viewUsageInfo = windowInfo.getViewUsageByID("<view id>");    
windowInfo.setDefaultRootViewUsage(viewUsageInfo);

Good Luck!

GLM

Former Member
0 Kudos

Hi GLM,

Thanks for ur reply. This is what I was looking for to resolve my problem.

Regards,

Preeti Kaur

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi Preeti,

As suggested you can have two applications for the same WD DC / Project.

Create another window and embed the view to it, say the edit View. The initial window can have the add view to it. Now create another application and use the new window.

With the same WD DC you will now have two application performing two different functionality.

Create two iViews in the portal for each of the applications and add to the role.

Regards,

Kartikaye J Gomber

former_member214651
Active Contributor
0 Kudos

Hi Preeti,

To make the 2 IViews visible in the detailed navigation part of the Portal, then u a 2 level workset hierarchy as follows:

-


>Parent Workset

-


> Child Workset

-


> Add Iview

-


> Edit IView

once u attach this workset to the role then both the IViews are displayed.

But once u add these IViews into the workset both the IViews will be visible irrespective of what ever is the condition.

To achieve this functionality try using the WDURLGenerator API to divert to the corresponding Application, by creating 2 different applications. Then add an application parameter for identifying as to which IView needs o be triggered.

However, the same functionality can be achieved by using a single IView by using the VISIBLE and read-only property of the UI elements

Hope this helps u

Regards,

Poojith M V

birojpatro
Contributor
0 Kudos

Hi Preeti,

One of the approach is to create two different applications. Create two iViews and hence you can use portal eventing functionality, if you want any communication between two applications.

Note: you need to put both of your iViews in the same Portal page. The demerit is, you wont be able to get two detail level navigation links.

Here to send default params on start of any of the iView/application, You can use the WebDynpro java iView property Application parameter.

Another approch will be create one application and put both the views in the same. Then Create iView from the deployed WebDynpro Application->View.

You will get a lot of document for Portal and Webdynpro integration in help/SDN.

Good Luck!!!

Biroj Patro.