on 12-05-2005 12:50 PM
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.
Hi deepak,
Just have two different views for messages and just fire plug it according to the condition.
Hope this helps u
Regards,
Nagarajan.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Deepak.
You have answered your question by yourself :-). Create Dispatcher component, check user status there and fire appropriate plug.
Best regards, Maksim Rashchynski.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Just use
wdThis.wdFirePlug<plug name>();
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
24 | |
11 | |
9 | |
7 | |
6 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.