cancel
Showing results for 
Search instead for 
Did you mean: 

Change default view at runtime

Former Member
0 Kudos

Hi,

Is there any way I can change the default view in a window at runtime?

Aviad

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

1. Embed the new view in the existing window and mark it as non default.

2. Make sure that this newly embedded view has an ID (in this case I've used the ID extrnlView).

3. Create a method openExternalWindow in the Component Controller.

4. Implementation of openExternalWindow:

IWDWindowInfo win = wdComponentAPI.getComponentInfo().findInWindows("<window name>");

win.setDefaultRootViewUsage(win.getViewUsageByID("extrnlview"));

}

Regards,

Satyajit.

Former Member
0 Kudos

Hi,

I was almost there (except from step 2).

But when I try this no view is visible - I get a blank screen (no view is set to default). When I set one of the views as default I get this view regardless of what I entered.

Aviad

Former Member
0 Kudos

Hi,

Have you given the view an ID? This is different from the view name. You will need to expand the window from the WebDynpro explorer view, select the view and from the properties view give an ID for this view.

Regards,

Satyajit.

Former Member
0 Kudos

Hi,

I have given both views an Id.

Furthermore, I have debuged the application and seen that everything seems ok (I get the window, get the viewusage, the window sets the default) but the screen does not refresh.

Aviad

Former Member
0 Kudos

I have found a solution:

Answers (0)