cancel
Showing results for 
Search instead for 
Did you mean: 

login and view

Former Member
0 Kudos

Hello,

I have a requirement where if the user already has a booked appointment I show him a different view and if he doesnt I show him another view. What is the best way to do this? Have an empty view and have two outbound plugs and firing any one of them or can this be done from the component interface view controller.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi deepak,

Just have two different views for messages and just fire plug it according to the condition.

Hope this helps u

Regards,

Nagarajan.

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi Deepak,

You can also play with visibility.

When you make the application click on the authentication option.

Whatever UI elements you want to show for a registered user put them all in a group.

Create a context attribute say att1.Select the type to be dictionary simple type.select local dictionary->com.sap....uielementdefinitions->visibility

Bind the visibility of that group to att1

add security.api.jar

In init check for the logged in user using the following code

try

{

IWDClientUser wdUser = WDClientUser.getCurrentUser();

IUser user = wdUser.getSAPUser();

if (user != null)

{

IUserAccount[] acct = user.getUserAccounts();

if(acct[0] != null)

{

String strUserid = acct[0].getLogonUid();

}

}

}

Once you get the id you can set whether the group should be made visible to the user.

if(user has registered)

{

wdContext.currentContextElement().setatt1(WDVisibility.VISIBLE);

}

Else

{

wdContext.currentContextElement().setatt1(WDVisibility.NONE);

}

Hope this helps you

Regards

Rohit

former_member182372
Active Contributor
0 Kudos

Hello Deepak.

You have answered your question by yourself :-). Create Dispatcher component, check user status there and fire appropriate plug.

Best regards, Maksim Rashchynski.

Former Member
0 Kudos

Just use

wdThis.wdFirePlug<plug name>();