on 04-16-2009 12:58 PM
Hello
I would like to create approval button in a Web Dnypro application which will be visible only to the manger
is there any step by step guide/blog or thread that I can use ?
I am new portal developer
thx
Shai
answered
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi ,
At first depending upon the role, is the login user manger or employee.
Create one context value attribute(Vis) and for that attribute set the property as visibility from the browse option.
set the visible property of your button as the context attribute that you have created.
You need to put this coding in the ModifyView of the View implementation
If(manager)
{
wdContext.currentContextElement().setVis(wdVisibility.NONE)
}
Hope this will resolve ur problem
Thanks
Kanai
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Create an Attribute of type Visibility and Bind it to your button.
and now make it visible when the user is Manager
wdContext.currentContextElement().setVisibility(WDVisibility.VISIBLE);
Hope this helps,
Jithin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
What you could do is set the Enabled property of the Button as per the current portal user, perhaps...
You can get the current Portal Users details using some of the below code. You might have to , perhaps, execute a Adaptive RFC Call additionalle to retrieve a list of valid Manager names, for example.
You can then check the name returned from this call against the current portal user and enable/disable the button. Let me know if you need more info
try {
IWDClientUser clientUser = WDClientUser.getCurrentUser();
IUser user = clientUser.getSAPUser();
String displayname = user.getDisplayName();
wdContext.currentContextElement().setDisplayname(displayname);
String uniquename = user.getUniqueName();
wdContext.currentContextElement().setUniquename(uniquename);
String firstname= user.getFirstName();
wdContext.currentContextElement().setFirstname(firstname);
String uid= user.getUniqueID();
wdContext.currentContextElement().setUid(uid);
String jobtitle= user.getJobTitle();
wdContext.currentContextElement().setJobtitle(jobtitle);
String lastname=user.getLastName();
wdContext.currentContextElement().setLastname(lastname);
}
catch (WDUMException e)
{
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 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.