Whatever login to the page (username) that name I can see in my page

Hi,
I am creating a page called leave Request.One field is there called "name".Actually whatever I login (Suppose my name).That name i can see in that field..How I will get that?
Suppose I logged in as suman...that name I can see that field
This is my design page in WD java
Number:
Name:Suman
Gender:
e.t.c e.t.c
Regards,
Suman

Hi Suman,
If you want to get the uniquename of the logged in portal user use this code.
String Username = "";
IWDClientUser wdUser = null;
try {
wdUser = WDClientUser.getCurrentUser();
} catch (WDUMException e) {
e.printStackTrace();
IUser user = wdUser.getSAPUser();
Username =user.getUniqueName();
// for unique ID use user.getUniqueId().
for this you need to add the security.api jar file.
Right click on the project properties->addexternal jars and add this .jar file
If you want to get the Portal Roles then use the following code:
Iterator itr = user.getRoles(true);
IRoleFactory rfact = UMFactory.getRoleFactory();
while (itr.hasNext()) {
String roleName = (String) itr.next();
IRole role = null;
try {
role = rfact.getRole(roleName);
wdComponentAPI.getMessageManager().reportSuccess("Role:" +
roleName
+ "Display Name:" + role.getDisplayName()
+ "ID: " + role.getUniqueID()
+ "Uniquename: " + role.getUniqueName()
+ "Description: " + role.getDescription());
} catch (UMException e) {
wdComponentAPI.getMessageManager.reportException("error: " + e.getLocalizedMessage(),true);
Regards,
Jhansi

Similar Messages

Maybe you are looking for

  • How to send jpegs in a text message

    Is it possible to send jpegs in a text message?

  • Attempting to use USB/Easy Transfer from XP to 8.0

    Easy Transfer copies XP for a minute or so, then pop-up says "Problem with selected media".   No further info provided.  New unused 64GB SanDisk.  What do I do now?  Thanks from old guy that doesn't speak computereze.

  • Possible to Merge Reports?

    I was wondering if it is possible to concatenate several different reports in PDF format together, so the user can click on a web link that will show multiple reports in one PDF file rather than have to click through to each seperate report. Can it b

  • How to use a transferfunction as a sub VI

    Hello,          Iam trying to make a pid controller.I succeed when I used a transferfunstion H(S) as the parameter to control.It is attached with the name controlsystemdesign.vi.But my aim is to use my own transfer function pidcontroltransfun.vi inst

  • Why does my laserjet 5p keep detecting as postscript?

    I have a LaserJet 5P. When I install it, I don't get the option to select that it's postscript or non-postscript. Consequently all of my documents look like userdict()print flush}%%BeginFeature which is very rarely what I wanted. Why is my computer o