cancel
Showing results for 
Search instead for 
Did you mean: 

Setting a Default Viewset in a Window Dynamically

MVar
Explorer
0 Kudos

Hello everyone,

I've created a Window with 2 viewsets. One of the viewsets is now currently set as a default and the other is not. When I start my application, based on certain conditions, I want to be able to set which of the 2 viewsets become the default viewset.

Any help will be highly appreciated.

Thanks,

Mike

Accepted Solutions (1)

Accepted Solutions (1)

vijayakhanna_raman
Active Contributor
0 Kudos

Hi mike,

Where will u check the condition to navigate to ur viewset according to the condition. u can create a view as default and then create a button and from there u can navigate to any of the two viewset depending on ur application.

Let me know ur problem more precise.

Regards,

Vijayakhanna Raman

MVar
Explorer
0 Kudos

Hello Vijayakhanna,

When a user logs in, depending on how he is setup in our system (Administrator or User) I want to show a different viewset for the type of user. I plan to do this in the interface view in the onPlugDefault method.

If the user is an Administrator, i'd like the user to see the Administrators Viewset and if the user was an ordinary user, I'd like that person to see the User's Viewset.

regards,

Mike

Former Member
0 Kudos

Hi Mike,

By checking on the codition just fire plug to the corresponding views inside ur viewset.

If(administrator)

{

wdThis.wdfirepludTOAdminview();

}

elseif(user

{

wdThis.wdfirepludTOUserview();

)

Hope this helps u,

Regards,

Nagarajan.

MVar
Explorer
0 Kudos

Hello Nagarajan,

Were do I code this logic?

If(administrator)

{

wdThis.wdfirepludTOAdminview();

}

elseif(user

{

wdThis.wdfirepludTOUserview();

)

Thanks,

Mike

Former Member
0 Kudos

Hi mike,

Give this code in the submit button of the login view where u r giving ur user and administrator entry.

Regards,

Nagarjaan.

vijayakhanna_raman
Active Contributor
0 Kudos

Hello Mike,

That login page show be a view in ur application otherwise it is not possible to do.

As i already said. The fireplug code should be done in that view only befofe that u have to create the plugs between then the views.

Regards,

Vijayakhanna Raman

MVar
Explorer
0 Kudos

Hello Nagarajan,

This solved my problem. I created a dummy view and viewset on my page. This dummy viewset will determine what type of user is logged in and will then fire a plug to the appropriate viewset.

Thanks very much for your assistance.

Mike

vijayakhanna_raman
Active Contributor
0 Kudos

Hello Mike,

Check with my first reply.Wasn't it of any use to u?

I said the answer before itself.

Regards,

Vijayakhanna Raman

MVar
Explorer
0 Kudos

Hello Vijayakhanna,

I could not understand the solution you were proposing and you said that it could not be done.

Thanks,

Mike

Answers (4)

Answers (4)

Former Member
0 Kudos

hi mike

if you want to show a different view from the login view

depending on the user then do coding as nagraj said.

the following link may be useful regarding the UME permissions

which i hope is what you are dealing with.

https://www.sdn.sap.com/irj/sdn?rid=/webcontent/uuid/adcfa85d-0501-0010-a398-80a47b8e3fc2 [original link is broken]

regards

saravana

vijayakhanna_raman
Active Contributor
0 Kudos

Hi mike,

If both the viewset is in the same window then the default viewset will be seen in the browser so it is not possible to check from ur System setup.

Regards,

Vijayakhanna Raman

Former Member
0 Kudos

hi mike

is it that you want to show different viewsets depending on the user.as far as i know it is possible in enterprise portal.where you assign a viewset to user depending on their roles.the thing which you said can be exactly done using enterprise portal.

regards

saravana.

Former Member
0 Kudos

Hi,

The property for setting the default view and viewset cannot be bound to context varaible, so cannot we cannot set the property dynamically.

However another method exist, i.e. if you fire plug to one of the view's of any of the viewset based on the condition then the control goes to the viewset which has the view embedded in it.

I hope you understood the method.

regards,

Mahesh