Getting the Role Title

Hi All,
I developed one WD application which browses all the Roles in EP. I am using the code given by Prakash Singh in his weblog on Browsing through Roles,Worksets,Pages and Iviews. In his weblog /people/prakash.singh4/blog/2005/07/28/browse-roles-folders-pages-iviews-assigned-to-a-user-ep6-sp9-and-higher he was not mentioned how to get the Role Title, but he had given the code to get description and Display name of a Role using role.getDescription()and role.getDisplayName().
Is there any method to get the Title of a Role in the EP.? If yes, Could you please respond to this thread.
Thank you in advance,
Sandeep Kumar B

Hi Denish,
"Title of Role" is name of a role displayed in the browser.
I am using the following code to get the name of a role
try{
IPcdContext targetObject = (IPcdContext)initialContext.lookup(browsing_root);
Object object = (Object)targetObject.getAttributes("").get("com.sap.portal.pcm.Title");
if(object instanceof IPcdAttribute){
     IPcdAttribute att = (IPcdAttribute)object;
     objtitle = att.get().toString();                    
} catch (NamingException e) {
          msgMgr.reportSuccess(e.toString());
          e.printStackTrace();
It is throwing ClassCastException at the first line.
How can I get over this classcastexception.
Thank you,
Sandeep Kumar b

Similar Messages

  • How do get the role from ldap session.

    i am using the follwing getting the role from the request in openldap and j_security_check:
    f(request.isUserInRole("manager")){
    how can i use this in the session:

    You might wanna change permissions for that attribute ...
    Change it from Admin to OWNER and you should be able to then get it for any user ...
    HTH ..

  • How to get the Role from a process

    Hi,
    I have a process where I have different role panes with human intervention activities. Each human intervention invokes a screenflow.
    Is there any method by which I can get the role pane from which an intance is generated
    For e.g. in process P1, I have 3 different role panes i.e. R1, R2, R3. Suppose there is an human intervention activity A3 in R3. It invokes a screenflow in which there are different methods. I want to get the roleId here i.e. R3.
    Through creation data I can know the instance creator i.e. participant ID, but a participant can have more than one role. I want to get the role from which the Human Intervention activity is invoked.
    Please suggest / help.
    Thanks
    Jayant

    Hey Thanks a tonn
    It works fine by the following code
    role = Activity.role
    logMessage "message"
    logMessage "Role: " + role.name
    role.id returns an int, so I used role.name
    Thanks and Regards
    Jayant

  • From which table we can get the Role of the User in SRM

    Hi  All,
        I need to prepare a report which displays the user and his role in srm. So from which table i can get  the role of the user if i have the Userid.
    Thanks
    Channappa Sajjanar

    Hi
    t- code
    SUIM->rOLES->BY USER ASSIGNMENT
    SELECT WITHASSIGNMENT OF USER = username
    AS A OUTPUT YOU MAY GET ROLE ASSIGNED TO THAT USER.
    if you want which FM - you debug while executing this report.
    regards
    Muthu

  • How do I get the song titles to appear when I burn a playlist from iTunes?

    I burned a playlist from iTunes, and the song titles on the burned CD changed to Track 1, Track 2, Track 3, etc. How can I get the song titles to appear as they do in iTunes? Is this really too much to ask from the world's leading music player software?

    If you are burning an audio CD, you cannot as audio CDs do not have track names. Nothing to do with Apple.

  • How to get the role name in which query is published ?

    Hi Experts,
       Is there any table where i can get the name of the role in which a particular query is published. I know that if i have a role , i can check in pfcg giving that role name and in menu tab i can see all the queries published under that role. But if i know query but not role how to get the role name . Is there any table or functon modules or programs to get the information.
    Thanks & Regards
    Vamsi Kiran

    Check this table
    AGR_HIER

  • You can get Roles but can you get the Role of the user

    Can you display or hide items dependant on the roles of the logged in user is assigned too.
    I know you can do this for the menu using menu.json
    "visible": true,
            "applyIf": {
                "userHasRoles": ["Administrators"]
    But what about for other elements inside the app. Is there a way to get the roles of the user logged in.
    Is this missing as a feature or am I missing some pieces.

    I just want to hide or remove a page element ie if(adminUserRole != 'Admin') {$('#element').remove}. Just some way to see the roles of the admin user that is logged. But yes early days.
    On a side note BC are looking to launch the project and advertise the store on the 17th is this not a bit ahead of themselves if there is a potential that apps functionality may be reduced because of new policies, restrictions etc even if only temporarily. Once apps hit the masses this may cause some tension when people loose functions they once had.
    Edit :Ok BC have already changed the date of the launch. I jumped the gun in saying this as they have it all under control.

  • How to get the Role of the logged in User?

    Hi All,
    Enclosed below is the code am trying to use to get the role for a logged in portal user. But it fails
    1. Due to class path errors although I have imported the necessary jar files.
    2. Am unable to invoke/find getSAPUser() method or invoke the UMFactory.
    Iterator rit = null;
    IWDClientUser clientUser = WDClientUser.getCurrentUser();
    IUser user = clientUser.getSAPUser();
    rit = user.getRoles(true);
    IRoleFactory rfact = UMFactory.getRoleFactory();
    while (rit.hasNext()) {
    String roleName = (String) rit.next();
    IRole role = rfact.getRole(roleName);
    wdContext.currentContextElement().setRole(role);
    What could be the problem and what are the jars that need to imported as I am using EP7.0
    Thanks for all your help in advance.
    Best regards,
    Divya

    Hi Divya,
    Add WD_RUNTIME/com.sap.security/lib/com.sap.security.api.jar to your project`s java build path.
    Best regards, Maksim Rashchynski.

  • Is there a way using javascript to get the Site title?

    I was wondering if there is a way to get the site title using javascript and then place that info in a workflow var?

    Hi SPSADmin,
    If you are using custom workflow then you can easily get site title in the workflow.Please go through below link to get site title
    http://msdn.microsoft.com/en-us/library/office/gg749857(v=office.14).aspx
    For Sharepoint designer workflow its bit tricky but you can achieve
    http://www.experts-exchange.com/OS/Microsoft_Operating_Systems/Server/MS-SharePoint/Q_27910482.html
    Regards
    Soni K

  • Get the role of a user in portal 6.0

    Hello,
    I need to get the role of a user in portal 6.0. I want to do this in one of the templates to dynamiclly size our tabs due to the fact some roles have more tabs then others.
    travis

    You have to use the Identity Server SDK's to do this ..
    create SSOToken and AMStore Connection object. Using that you can get the AMUser object and do getRolesDNs to the roles the user is assigned to or from AMStoreConnection you can do a getTopLevelContainers to get the orgs, roles etc assigned for the signed in user ..
    take a look at the identity server samples it should be in
    /install_dir/SUNWam/samples/sdk
    HTH ..

  • Get the window title?

    I want to use the method AVWindowGetTitle(AVWindow window, ASText text) to get the window's title, but it even cannot be built successfully. When building the project, it always says "AVTArraySize(_cdecl *)(AVWindow, char *, AVTbufferSize)': too few arguments for call". But it's explictly, I called AVWindowGetTitle but not AVTArraySize... In our SDK's samples, we also call AVWindowGetTItle, why it cannot pass in my code?
    The purpose I get the title is Adobe sdk does recongnize pdf file name in Chinese, so I want to have a try to get the title of the window. If any other way we can get the Chinese name of the file, that would be better.
    Thanks a lot.
    Thanks
    Daniel

    You don't mention what version of the SDK you are using with what compiler on what OS platform.
    Acrobat 9 and X SDKs (which are the only ones supported at this time) work just fine with Chinese filenames.  What API calls are you using that do not?
    From: Adobe Forums <[email protected]<mailto:[email protected]>>
    Reply-To: "[email protected]<mailto:[email protected]>" <[email protected]<mailto:[email protected]>>
    Date: Thu, 24 Nov 2011 05:00:01 -0800
    To: Leonard Rosenthol <[email protected]<mailto:[email protected]>>
    Subject: get the window title?
    get the window title?
    created by aaaawerewedsv<http://forums.adobe.com/people/aaaawerewedsv> in Acrobat SDK - View the full discussion<http://forums.adobe.com/message/4044745#4044745

  • Getting the song titles from the internet

    I cannot automaticlly get the song titles. What do my internet settings need to be. I run on Windows XP.

    hiya!
    fingers crossed, this user tip might be of some help with that:
    Scott P: Can’t connect to Music Store or CDDB
    love, b

  • Get the page title from definition

    Hi, If I have the page definition label, how can I get the page title from jsp page or java class? Thanks

    If the jsp is on a portlet on that page then use
    http://download.oracle.com/docs/cd/E13155_01/wlp/docs103/javadoc/com/bea/netuix/servlets/controls/page/PagePresentationContext.html
    If you want to find out for some other page (i.e. the current page is different from the page you want the title of) then use
    http://download.oracle.com/docs/cd/E13155_01/wlp/docs103/javadoc/com/bea/netuix/servlets/controls/application/DesktopPresentationContext.html
    getPagePresentationContextRecursive...

  • Getting the Process-Title (WD)

    Hi,
    how can I get the actaul process-title in a web dynpro application.
    In the GP-API I found the interface IGPProcessInstanceInfo but Im not able to get an intance of this.
    I tried out the following, but theres no possibility to get the IGPProcessInstanceInfo.
    runtimeManager.setCustomProcessTitle( executionContext.getProcessId()  , newTitle);
    IGPProcessInstance actualInstance = runtimeManager.getProcessInstance(executionContext.getProcessId(),executionContext.getInitiator() );
    Thanks for helping me
    Steve

    Hi Aliaksei,
    my only wish was to get the process-title.
    So I searched in the API to get informations how to get the title. And I found no way to get it, because there was no method getTitle() only in the interface IGPProcessInstanceInfo, which I cannot achieve.
    Meanwhile I found the method, you proposed me, in the API too.
    Thanks in advance

  • Help needed in getting the Role Description from BOL Entities

    Hi All,
    I am trying to retrieve BP Role and BP Role Description and display the details at the top of account over view page.
    I am fetching the BP Role details using 'BuilRolesRel'. but i am not able to find any BOL Query to get Role Description.
    Any pointers on this is really very very helpful.
    Thanks,
    Udaya

    Hello Udaya,
    under BuilRolesRel there is a entity BuilRoles and this entity has an Attribute RLCTITLE.
    this is a Description of the role.
    Good Luck
    Eli Steklov
    Please Reward Points if it Helped

Maybe you are looking for