cancel
Showing results for 
Search instead for 
Did you mean: 

View Defaults

MG3
Contributor
0 Kudos

Hi

Views arrangement in my DC is like this:


ViewA
   |-AView1 - tab in view A
   |-AView2 - tab in View A

ViewB
   |-BView1 - tab in View B
   |-BView2 - tab in view B

At one time, only one of these can be marked as default in the window diagram view.

The scenario is like this:

By default, set the 'default' property of ViewA to true and ViewB becomes false.

If I want to navigate from another DC straight to ViewB, is it possible?

Is it possible for me to change the default value of ViewA to false and set the default property value of ViewB to true?

Thanks

oj

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi

yes you can change the default property of viewA & viewB when you create view go to the property of view & make it visible, or during runtime also u can do the same through Context.

Regarding the calling of view B in some other DC yes u can do that also , plz try this procedure link the view with Interface view controller & put this view in a model which is of type used models then u can use that model with particular view in another DC.

I hope this will work out

PS: reward points.

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

You cna change the default view of a window dynamically by using the following code:


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

Regards,

Satyajit.

former_member182372
Active Contributor
0 Kudos

Hi,

When you "navigate from another DC straight to ViewB" you will use not a view plugs and view navigation BUT interface views (which are bound to windows). So, create separate window with ViewB as default and use it in inter DC`s navigation.

Best regards, Maksim Rashchynski.

MG3
Contributor
0 Kudos

Thanks for the replies.

BTW, which would be a better approach?

1. Creating a new window with the ViewB and navigating to this from another DC. (How can I do this?)

or

2. Having both views ViewA and ViewB in the same window and implementing the code in the component controller to set the default views? (Would the code work in the conponent controller??)

Thanks

oj

Former Member
0 Kudos

Hi,

If you are navigating from another DC, you will need to put the code in the interface controller. Or else you can call some method in the interface controller which in turn will call a method in the component controller to set the default view.

So this is what you will need to do:

1. Declare DC A as a used DC in DC B.

2. Create a outbound plug from DC B to the interfaceview of DC A.

3. Fire this plug from DC B when you need to navigate.

4. In the action handler for the inbound plug of DC A, you can call some method to set the default view.

Regards,

Satyajit.