on 12-08-2008 5:26 AM
Hai every one ,
i have one issue that is in appliaction when ever the user log in to application.
we need to identify weather he is user or administrator .
if he is administator the ui element is became up as Dropdown by key. and he can select different users.
if user is login to application , the field is became fix with his name.
how to do it is ...
i writen code in wdinit method of component controler.. that is identifying login user
IWDClientUser user =WDClientUser.getLoggedInClientUser();
IUser name = user.getSAPUser();
from this step onwards in view level what i need to do..
if any one know tell me...
Hi
try to get the role using this code
IUser user = clientUser.getSAPUser();
Iterator role = user.getRoles(true);
String str = "";
while (role.hasNext())
{
String rolestr = (String) role.next();
try {
IRole r = UMFactory.getRoleFactory().getRole(rolestr);
str = str "\n" r.getDisplayName();
}
catch (UMException e1)
{
wdComponentAPI.getMessageManager().reportException(e1.getMessage(),false);
}
then put the if codtion by checking if(rolestr .equalIgnoreCase(AdminRole)) then put ur logic inside this loop
thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
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.