How to get IPortalComponentRequest Object?

Hello all,
I need to get a handle on the IPortalComponentRequest Object for the following code. A direct cast from HttpServletRequest to PortalComponentRequest throws a classcast exception. Is there any way I can get to know the name of the WD iview and its location in the pcd?
     NavigationEventsHelperService navHelperService = (NavigationEventsHelperService) WDPortalUtils.getServiceReference(NavigationEventsHelperService.KEY);
          IPortalComponentRequest request = (IPortalComponentRequest) httpRequest;
          INavigationNode navTargetNode = navHelperService.getCurrentNavNode(request);
Thanks for your time,
Raj Balakrishnan

Hi Lohi,
I didn't found the com.sap.ep.applicationdevelopment jar.
I add the servlet.jar, but I think U didn't understand my problem.
I work now on Web Dynpro Project, So I don't know how to handle the request object.
Usually when I work on  DynPage Project I handle the request object from the parent Object:<b> IPortalComponentRequest request = (IPortalComponentRequest) this.getRequest();</b>
Thanks,
Maya.

Similar Messages

  • How to get the object class field value in CDHDR table for vendor

    hi
    how to get the object class field value in CDHDR table for vendor

    Try KRED/KRED_N as object class in CDHDR for Vendor.

  • How to get POF object's field value from query result

    hi,all:
    I want to get field value from the query result, my code is below
    Set setResults = cache.entrySet(createFilter("homeAddress.state = 'MA'"));
    for (Iterator iter = setResults.iterator(); iter.hasNext(); )
    Contact c=(Contact)iter.next();
    System.out.println ("firstame####=" + c.getFirstName());
    * but I get error*
    Exception in thread "main" java.lang.ClassCastException: com.tangosol.util.ConverterCollec
    tions$ConverterEntrySet$ConverterEntry cannot be cast to com.oracle.handson.Contact
    at com.oracle.handson.QueryExample.printResults(QueryExample.java:159)
    at com.oracle.handson.QueryExample.query(QueryExample.java:86)
    at com.oracle.handson.QueryExample.main(QueryExample.java:43)
    who can tell me how to get POF object's field value from query result

    Hi,
    If you look at the Java Doc for the entrySet method here http://download.oracle.com/docs/cd/E15357_01/coh.360/e15725/com/tangosol/util/QueryMap.html#entrySet_com_tangosol_util_Filter_ you will see that it returns a Set of Map.Entry instances so you need to do this...
    Set setResults = cache.entrySet(createFilter("homeAddress.state = 'MA'"));
    for (Iterator iter = setResults.iterator(); iter.hasNext(); )
        Map.Entry entry = iter.next();
        Contact c=(Contact)entry.getValue();
        System.out.println ("firstame####=" + c.getFirstName());
    }JK

  • How to get Request object and LDAP user

    Hi All,
    How to get Request object, coz i want to see the out put of this code
    IUser myUser = request.getUser();
    String uid=myUser.getUid();
    I want to get only LDAP user from the server, for that i am having  code but i think this code is returning me all user from the server.
    com.sap.security.api.IUser user = null;
    try {
          IUserFactory userFactory = UMFactory.getUserFactory();
         IUserSearchFilter searchFilter = userFactory.getUserSearchFilter();
    ISearchResult searchResult = userFactory.searchUsers(searchFilter);
       int count = 0;
        List list = new ArrayList();
         while (searchResult.hasNext()) {
                      count++;
                       String uniqueid = (String) searchResult.next();
                        user = userFactory.getUser(uniqueid);
                        list.add(user.getUniqueName());
    This code is giving me all user from the server LDAP and as well as portal user.
    But i want only LDAP.
    Please help me out. It's urgent.
    Regards,
    Deepak

    Hi
    use the following code
    //Request
    IWDRequest = WDProtocolAdapter.getProtocolAdapter().getRequestObject();
    //User
    IWDClientUser = WDClientUser.getCurrentUser();
    Regards
    Ayyapparaj

  • How To get getServletContext() object inside JSP from  Eclipse  IDE

    Dear friends,
    I can access methods in getServletContext class from Netbeans in my JSP web project using the following steps.
    String path=getServletContext().getRealPath("\mypath");
    . But In Eclipse when i try to build,it says that "can not find method -getServletContext()".
    How to get this object in my JSP Scriptlet From Eclipse IDE? Plz help me?

    use Expression Language instead.
    I would.
    http://java.sun.com/j2ee/1.4/docs/tutorial/doc/JSPIntro7.html
    regards,i

  • How to get PortetSession object in backing file

    Hi all,
    Is it possible to get PortletSession object for current portlet in a backing file. If it is then could you please tell me how?
    regards
    -saurabh

    Pl see your duplicate post here - How to capture SQL *Loader program parameter value in control file?
    Srini

  • How to get File  object from Document Object . ?

    In conventional Dom Parsing we pass file to DocumentBuilder to get Document Object .
      File file = new File("c:\\MyXMLFile.xml");
      DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
      DocumentBuilder db = dbf.newDocumentBuilder();
      Document doc = db.parse(file); // gOT Document here . My problem is how do i get File object back from Document . If i have Document object with mi.
    Please consider above code as example i dont have File object in my code . i am using Xhive DB API where i get Document directly from API method .
    I need to convert this Document to File to get size of file
    Please suggest solution on this
    Edited by: AmitChalwade123456 on Dec 5, 2008 6:10 AM

    Hello Guys any views on this topic

  • OIM - Task Assignment Adapter - How to get the object instance key?

    Hello experts,
    I'm trying to use a task assignment adapter to assign an approval task dynamically. Basically, the user can request a resource like "CustomApp Profiles" and we create an object form to let them choose the profile that he needs. Each profile has an owner, which is populate in a Lookup (Owner is the code and Profile is the decode).
    So, in the approval task, I need to get the profile selected by user in the object form and search into the lookup who is the owner of that profile. But I don't know how can I get the object instance key using the parameters that can be mapped to a task assignment adapter.
    Looking into the OIM documents, I believe that the easier way is using the request key, because the REQ_KEY is a foreign key in OBI table.
    Did anyone knows how can I get the object instance key using the request key? Can I use some API or should I execute a SQL statement directly in OIM database?
    Best Regards,
    Nitto

    To retry a task that is in a rejected state, you use the SCH_KEY which is the task key.  In OIM, all rejected tasks are listed in the OTI table.  It contains all the important information about a rejected or pending task.
    You can use the APIs found in the tcProvisioningOperationsIntf class to retrieve open tasks.
    -Kevin

  • How to get stylesheet object from JAVA RESOURCE stored in DB

    Hi,
    I stored a xslt file in the database and have a JAVA RESOURCE file now. How can i get a stylesheet object from this resource file?
    I took the following class to get an impression how to get the contents of the resource but -although the name of the resource was spelled correctly- i got a file not found exception.
    Whats wrong?
    public class PrintRessource {
    public static void print (String p_ressource){
    try {
    Class c = PrintRessource.class;
    System.out.println(c.toString());
    InputStream file = c.getResourceAsStream(p_ressource);
    if (file == null)
    throw new FileNotFoundException("XSLT file not in DB");
    byte[] buffer = new byte[4096];
    int bytes_read;
    while ((bytes_read = file.read(buffer)) != -1)
    System.out.println(new String(buffer, 0 , buffer.length));
    catch (Exception exp) {
    System.out.println(exp);
    Thanks

    The code works as is. I just forgot to add the slash in front of the Resource file name.

  • How to get Anchor object pointer

    Hi All,
    I have a text frame and and i have an anchor object attached to it. Now i just select the text frame and get the UID of the text frame. Now i would like to get the Anchor object ineterface pointer with attached to the Text Frame.How to get it?
    Thanks
    Sakthivel.P

    Hi Sergiy,
    I tried, but i am getting the ownedItem Interface pointer as null.
    This is what i tried
        ISelectionManager* iSelMgr = nil;
        iSelMgr = Utils<ISelectionUtils>()->GetActiveSelection();
        if(iSelMgr == nil) return kFalse;
        InterfacePtr<ISupUnTagEleUISuite>selItemSuite(iSelMgr,UseDefaultIID());
        if(selItemSuite == nil) return kFalse;
        UIDRef itemRef;
        if(selItemSuite->GetSelectedUID(itemRef)==kFalse) return kFalse;
        InterfacePtr<IHierarchy> itemHier(itemRef,UseDefaultIID());
        if(itemHier == nil) return kFalse;
        InterfacePtr<IOwnedItem> ownedItem(itemRef.GetDataBase(),itemHier->GetParentUID(),UseDefaultIID());
        if(ownedItem) return kFalse;
        if (Utils<IFrameUtils>()->IsPageItemAnchoredObject(ownedItem->GetFrameRef()) != kFalse)
            return kTrue;
    Thanks
    Sakthi

  • How to get caller object reference from a method

    Hi,
    I am working a already existing Java Swing project, now I got a problem, in a method I need to get the caller object reference otherwise, I can't succeed this operation. So please tell me a way how to get the caller object reference from a method. that method would be static or regular method anything will do for me.
    Edited by: navaneeth.j on Jan 29, 2010 11:20 PM

    navaneeth.j wrote:
    Actually my doubt is, I have a method "addition" method, which is using by many classes so my requirement is in the addition method I want to write a code snippet which will identify and get the the caller object. Actually I tried Reflection.getcallerclass but there I am getting "CLASS" object not the actual object reference, but I want object reference.
    Actually we have a huge project which is writen plain JAVA, so in this project the authors written the Database connection package for single database transaction. so now we are using this project source code for JSF application in this web application the DB package has serve based on the dynamic db connection parameters, so if we want to change this package fully means need to solve the dependency problem in hundreds of classes, so my point is if I can access the caller object in the DB package when ever it gets called by any class from any where of the project. So actually I liked Reflection.getcallerclass, the way of implementation perfectly works for me but it is not giving caller object reference, if something gives the caller object then I can get the DB connection parameters then there is no need to pass the parameters in the hierarchy.You can add a parameter (of type Object) to your addition() method
    and everywhere you call the addition() method also pass this (which from the POW of the addition() method will be a reference to the calling class instance).
    There may be alternative solutions
    but none that require less effort.

  • How to get JComponent/Object declared name

    I've got a JFrame that declares standard JComponent objects like (JComboBox, JTextField)
    JComboBox  sampleComboBox = new JComboBox();I need a method that can return a name (String) of this declared method.
    public String getObjectDeclaredName(Object obj){}example:
    When I call
    getObjectDeclaredName(sampleComboBox )I want to get back
    "sampleComboBox " - as a String
    I know than there is getName, setName method in JComponent, but I don't want to name each component every time.
    I looked at the Field class in reflect package, but I couldn't find a way how to do this? Does anyone know how to write a method like that?
    Thanks,

    So if it's not stored by the compiler (which I belive it is), how would you explain the way the java.lang.reflect package works?
    Field[] fields = sampleFrame.getClass().getFields();Using the retrospection you can get access to all declared fields within the class. The thing that I need is to get a declared name of the specific object from the memory, which is a bit different.
    I know the class where the object is declared, so I can get all declared fields, and their names. But I can't find a way how to get a name of the field that I'm interested in. I mean how can I compare an Object to the Field representation of the same object without creating a new instance from this field.
    And of course there is another way of doing that, I can define static fields with the names of all fields, or use setName method within the JComponent, but that would involve extra work. So having reflect package it would be doing additional work
    Anyone knows how to do that?

  • How to get execution object for ActiveX/CO​M method Step.GetRu​nModeEx?

    I would like to know how to get the execution object to pass into the ActiveX/COM method Step.GetRunModeEx.

    Hey Snood1,
    There are other posts about this out there but as far as information in the released documentation it is kinda vague as to the fact that you can simply put any data type there.  The definition states "Data type that can hold any defined type of data"  But I can see the confusion that you don't have to actually convert it to a variant first.  Generally you do have to convert it first.  However some TestStand functions will allow any datatype and convert it for you. 
    Jon is going to create a Knowledge Base regarding this information and hopefully alleviate some of the pain for others in the future.
    Regards,
    jigg
    CTA, CLA
    teststandhelp.com
    ~Will work for kudos and/or BBQ~

  • How to get BW Objects not optmized for HANA on just migrated System from ORA to HANA?

    http://www.saphana.com/servlet/JiveServlet/previewBody/1363-102-2-1810/SDN_HANA_opt_InfoCube%20FINAL.PDF
    HI  .....HANA Experts
    We are early birds for HANA Technology !!!
    The above link is showing how to convert and limitations etc.
    We just migrated BW from Oracle to HANA.
    Our experts converted some BW Obejcts to HANA Optimized , some still open.
    Q1) In this juncture, to take the current stcok, Do we have any report which extract  directly list of BW objects which are still not optimized for HANA.
    Q2) How to get list of tables not yet fully loaded into Memory [or] How to get list of Infocubes & DSO's not yet fully loaded into main memeory
    Q3) When we optimize objects - The size in memeory & persistance store - Size is increasing - Is it normal behaviour ?
    Rgds
    PR
    PR Srinivas

    Hi,
    PR Srinivas wrote:
    We just migrated BW from Oracle to HANA.
    Our experts converted some BW Obejcts to HANA Optimized , some still open.
    ---- DSOs should not be converted. If you still want to please check RSODSO Table and check the column IMOFL (HANA Optimized setting for the DSO).
    For the InfoCubes, please refer to RSDCUBE table and CUBESUBTYPE column with value F for HANA optimized setting.
    Q1) In this juncture, to take the current stcok, Do we have any report which extract  directly list of BW objects which are still not optimized for HANA.
    Q2) How to get list of tables not yet fully loaded into Memory [or] How to get list of Infocubes & DSO's not yet fully loaded into main memeory
    Please check m_cs_tables to know which tables are loaded to memory and which are not.(Refer to LOADED column).
    Q3) When we optimize objects - The size in memeory & persistance store - Size is increasing - Is it normal behaviour ?
    Please check the Delta memory and perform Delta Merge. Please search on SCN to get the details on the same.
    Rgds
    PR
    PR Srinivas

  • How to get value object (entity abject) from ViewObject?

    How to get data from ViewObject in the form of value object? I know BC4J creates entity object for database table/view (looks like value object) but I did not find api to get entity object from ViewObject.
    Thanks.

    BC4J provides an implementation of the value object design pattern for you, so you don't have to waste time writing your own.
    I wrote a whitepaper illustrating how to take advantage of this at:
    Implement Collections of Value Objects for MVC Apps with BC4J
    This allows clients (like a servlet, a JSP, a Swing client, etc.) to get value objects from the collection of value objects that BC4J supports.
    However, if you are writing code inside your view object implementation class and want to access the entity object, just call the accessor that we generate into your view row implementation class for you. For example, for a VO named EmployeeView that uses an entity object named Employee, there will be a private accessor method getEmployee() that will give you the entity.

Maybe you are looking for

  • AIR 3.5 images flickering on Kindle Fire

    We are writing a game for the android platform. During the course of the game, as more and more memory is used up, more characters and sprites are added to the screen, suddenly many of the sprites on the screen start to flicker. It only does this on

  • Swapping images - need to change size

    I am trying to create a disjointed rollover so that when I click on a picture thumbnail in one frame, the full-size image changes on another frame (it is for a photo website - there are about 20 thunbnails on a page and a space for only one full-size

  • I just downloaded a free trial of Photoshop but it already says expired and I can't use it?

    Can anyone help? I just wanted to try it out, it did it with illustrator a few months back too

  • Camera Connection Kit not Working

    I got my Camera Connection Kit yesterday and i wasnt able to get it to work with my SD Card, it says "USB Device not Supported" when i plug the Card in The USB Connector doese nothing when i plug in my Nikon D700 or D300. When i Plug in my CF Card re

  • Set the PATH permanently windows vista 32-bit

    I need to set the PATH variable permanently for running JDK without specify the full path to the executable every time with windows vista 32-bit but I don't know how to do it. Someone can help me? I tried what this site said but it doesn't work (or I