WSRP portlets - consumer-side backing files

I'm trying to find a way to send the consumer-side portlet instance label and the desktop definition label into my WSRP portlets. The BEA WSRP documentation indicates that using a backing file is the way to do this. The only problem is that even though creating a backing file and extracting the two strings is straightforward, it isn't clear how to go about communicating the information from the backing file to the WSRP portlets, since the session and request spaces are independent. I could use some recommendations. Thanks in advance.

There is limited support for this in 10.3, in 10.3.2 there are some javascript libraries to help you add parameters to URL.
In 10.3 your best bet is as follows:
Do NOT modify the URL, instead do a POST to your actionUrl and pass in the parameter in the POST body. You, will also need to do use a PortletXMLHttpRequest to avoid getting the entire page returned.
Good luck,
Nate

Similar Messages

  • Portlet state in backing file

    I need to check whether the portlet is minimized in the portlet's backing file's
    preRender() method.
    Does anybody know if i can find the current mode (minimized, maximized, normal)
    of the portlet somehow? From the javadocs it looks like i need to get a reference
    to a PortletState object....
    Thanks,
    Oyvind

    How about something like the following?
    PortletBackingContext aContext =
    PortletBackingContext.getPortletBackingContext(
    aRequest
    sLogger.info("current window state is: \t" +
    aContext.getWindowState().getName());
    "Oyvind Johansen" <[email protected]> wrote in message
    news:40617642$[email protected]..
    >
    I need to check whether the portlet is minimized in the portlet's backingfile's
    preRender() method.
    Does anybody know if i can find the current mode (minimized, maximized,normal)
    of the portlet somehow? From the javadocs it looks like i need to get areference
    to a PortletState object....
    Thanks,
    Oyvind

  • Setting Portlet Preference in Backing File for Clipper Portlet

    Hi All,
    I have a clipper portlet, and I am setting the preferences(for form based authentication & passing application data dynamically) in the backing file which is then associated to the Clipper portlet. I looked up at the clipper constants that are available; and the example they have given is
    portlet.setPreference(LOGIN_FORM_EXTRA_PARAMS, "name1=value2&name3=value4")
    My question is what is this "portlet"?? is it an instance?? then whose instance/object it is?? how am I suppose to declare it in my Backing File??
    Any input on this would be appreciated.
    Thanks,
    G

    Hi,
    I'm guessing here... but I think that the example is referring to a PortletPreferences object, which can be obtained through a PortletBackingContext with the getPortletPreferences() method. To obtain a PortletBackingContext you just use the static method PortletBackingContext.getPortletBackingContext() and pass in the request in the backing file. See also: Using the Preferences API to Access or Modify Preferences
    Hope this helps,
    Petri

  • Inside WSRP- backing file

    Hello,
    I have problems with remote portlets, events and page flow.
    I have a remote portlet in the consumer. This portlet is generate from a pageflow. The portlet have a backing file with a customer method & the methods associated with the life cycle of the baking file.
    Also the portlet have an event that it is thrown when a specific action in the page flow is executed.
    The process is:
    1- In the form the action is thrown
    2- The Page Flow event is executed and it invoke a specific customer method on the backing file
    3- This method is executed
    4- The portlet goes to the next page.
    In local mode this process is sucess but when I make a remote portlet the specific customer method in the backing file is never called.
    I am looking for inside wsrp:
    http://dev2dev.bea.com/pub/a/2005/03/inside_wsrp.html?page=5
    However I have got others portlets that are not generated from page Flow with its associate backing file, specific customer method and it is sucess process.
    I suppose the problem is I can´t asociate correctly the method of the backing file with the portlet in the producer.
    Can someone help me with this problem?

    Correction:
    Put the class name for the Backing File:
    backing.test
    So, the class name is test and the filename is test.java. However, it is recommended that uppercase letter should be used for a class name. Like it should be Test.java instead.
    I hope this makes sense.
    Mansoor

  • How to receive the custom event in the listening portlet (No backing file)

    I have couple of portlets (JPF based). Portlet A is firing an event
         public Forward processAction()
              PortletBackingContext context =PortletBackingContext.getPortletBackingContext(this.getRequest());
              String message = "XXXXX";
              context.fireCustomEvent("customevent", message);
              Forward forward = new Forward("success");
              return forward;
    I have configured the Portlet B's eventhandler to listen for the 'customEvent' and invoke the pageFlowAction 'listenForEvent'
         @Jpf.Action(forwards = { @Jpf.Forward(name = "success", path = "test2.jsp") })
         public Forward listenForEvent() {
              Forward forward = new Forward("success");
              return forward;
    Portlet B's method listenForEvent is indeed getting invoked, but is there a way I can retrieve the 'Event' object (as fired by Portlet A) inside the listenForEvent. I could have done this via the Backing file, but for some reasons i cann't use the backing file. Is there a way i can get the CustomEvent and the associated payload in my listening JPF portlet, without a backing file?
    The WLP version is 10.3

    Hello,
    I originally said:
    All you should need to do is to modify the method signature for your event-receiving method. The method signature should be:
    public void listenforEvent(HttpServletRequest request, HttpServletResponse response, Event event)
    where Event is a com.bea.netuix.events.Event object. You can then cast this to a CustomEvent object.
    But I mis-read your earlier post about catching the custom event and invoking a pageflow action. When you do that, you will lose the custom event's payload (your message), and there is no way to retrieve it from your pageflow action.
    The only way you can actually retrieve the event's payload is using a backing file for the portlet, with a method having the signature I mentioned above. You can then set a request attribute with the event's payload and still have it invoke the pageflow action, at which time you could retrieve the request attribute value-- assuming you don't need to run this portlet over WSRP. Over WSRP, the event-handling and pageflow action-invoking lifecycles will happen with independent request objects, so you would need to store the event payload in session to work over WSRP.
    Kevin
    Edited by: kfrender on Aug 31, 2009 3:34 PM

  • Backing file init method always called for proxy portlets

    Hello,
    We are currently using Weblogic Portal 10 MP1. Deployed within our Portal EAR is a local proxy portlet and attached to this proxy portlet is a backing file, which currently implements the init() and prerender() methods from the backing interface.
    When this is placed in a page that is within a desktop, the init() method is always invoked no matter which page you access within the desktop. As I understand it from the documentation, if you have "tree optimization" turned on, then the init() method will only be called when rendering the actual page the proxy portlet is in. But this doesn't seem to be the case. However, if I define a standard Java portlet within the EAR and attach a backing file, then the init() follows the rules when tree optimization is turned on or off.
    Does anyone know if this is a defect within the portal framework, or is this expected and proxy portlets do not follow this rule?
    And I guess, if it is a defect or known limitation, is there a possible workaround? I assume the simplest workaround will be to move the logic into the prerender() method.
    Regards,
    Jonathan

    Hello Jonathan,
    Tree optimization is a tricky thing- some portlets may still be initialized even when the page they are on isn't visible. The rules for which get initialized and which don't are very complicated and depend on a number of things, so it is just best to not rely on the init() method not getting called.
    By far the best option for your use-case is to have the proxy portlet listen to the "onRefresh" event, and move the logic from the backing file's init() method into an event-handling method in the backing file, then have this method called when the refresh event is received. Here's a sample portion of the .portlet file for doing this:
    <netuix:handlePortalEvent event="onRefresh" eventLabel="onRefreshEvent">
        <netuix:invokeBackingFileMethod method="handleRefreshEvent"/>
    </netuix:handlePortalEvent>The "onRefresh" event is sent to the portlet only when it is visible on the page, so it should work perfectly for your use-case.
    Kevin

  • Backing Files Stop Working For No Apparent Reason.  Help?

    I have a portal application accessing a remote WSRP PageFlow portlet. The remote portlet populates a backing file and the producer application reads the data. It was working fine and then it stopped working for no apparent reason. The data was simply null, no errors or warnings. I put traces in the backing file and verified that the life-cycle methods were indeed being called and that data was there, and yes, both were indeed the case. Data is being set on the SimpleStateHolder and it's just not transferring over to the producer side.
    In order to rule out environmental issues, I've done this on multiple machines. Also, I started a whole new project, got backing file setup, verified that it worked, started developing with it and one time I deployed and it was broken again. I rolled out the changes I had just made but it didn't matter. The earlier code still failed to work although it had been working moments earlier.
    So, any ideas? Has anybody else encountered backing file issues like this and if so do you have any suggestions on debugging or fixing them?
    Ryan

    I have a portal application accessing a remote WSRP PageFlow portlet. The remote portlet populates a backing file and the producer application reads the data. It was working fine and then it stopped working for no apparent reason. The data was simply null, no errors or warnings. I put traces in the backing file and verified that the life-cycle methods were indeed being called and that data was there, and yes, both were indeed the case. Data is being set on the SimpleStateHolder and it's just not transferring over to the producer side.
    In order to rule out environmental issues, I've done this on multiple machines. Also, I started a whole new project, got backing file setup, verified that it worked, started developing with it and one time I deployed and it was broken again. I rolled out the changes I had just made but it didn't matter. The earlier code still failed to work although it had been working moments earlier.
    So, any ideas? Has anybody else encountered backing file issues like this and if so do you have any suggestions on debugging or fixing them?
    Ryan

  • How can I have a backing file call a JavaScript function?

    I have a Weblogic portal with a JSP portlet. The portlet has a backing file. How can I get the backing file to call a JavaScript function in my portlet?
    thanks

    Hi
    your questions are not correct because you are mixing up server side operations with client side operations.
    First server side code executes then the page is sent to the browser , then any javascript executes on the browser. So asking for javascript to be called from backing file (server side) doesn't make sense or asking for javascript to read a parameter doesnt exactly work either.
    However in your server code suppose you have a variable action in the request that you want javascript to know then in your JSP you would add something like
    <script type="text/javascript">
    var action = '${requestScope.action}';
    alert(action);//or whatever you want to do
    <c:if test="${requestScope.someOthervariable == ''xyz'}"><%-- this check is done on the server --%>
    callSomeJavascript(); <%--this javascript is only executed when the server side value of someOtherVariable is xyz --%>
    </c:if>
    </script>
    i.e. you can output the javascript that has the variables you need or the function calls you want.
    Like I said understand whats server side and whats client side.

  • 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

  • Prerender() in backing file... setting desktop titles dynamically

    I have a link in page1 (with pageflow1 and portlet1), clicking on which the user is taken to page2 (with pageflow2 and portlet2) and the begin action method gets called in pageflow2. The begin action forwards to another another action (say, action2). action2 sets some request attributes, then finally forwards to the JSP that needs to be rendered. I have a backing file for portlet2 that has the prerender method implemented. The prerender() checks the request attribute set in action2() and accordingly sets the desktop title.
    Now my problem is, the prerender is getting called BEFORE begin action is invoked. Shouldn't the prerender get invoked just beofre the JSP is rendered? If not, then how can I set the desktop title dynamically based on some data in an action?
    Thanks in advance!

    There are two backing files you can give for a portlet.
    1. Backing file for a portlet
    2. Backing file for a JSP
    Try giving the backing file reference in JSP instead of portlet.
    -sampath

  • Portlet backing file vs content backing file

    Hi,
    could someone explain the differences between a "portlet backing file" and a "content backing file". Both are properties available on a portlet.
    Thx
    Emmanuel

    According to the documentation, here is the difference:
    Scoping and Backing Files
    The difference between having a backing file as part of <netuix: portlet backingfile =some_value> or part of <netuix: jspContent backingfile=some_value> is related to scoping.
    For example, if you have the backing file on the portlet itself, you can actually stop the portlet from rendering. If the backing file is at the jspContent level, the portlet portion of the control tree has already run; you use this implementation to run processes that are specifically for the JSP in the portlet.
    See http://download.oracle.com/docs/cd/E13155_01/wlp/docs103/portlets/building.html#wp1077130 for more info.
    Brad

  • Is it possible to use a portlet backing file on the dvt_enabler portlet?

    We currently have a 9.2 portal with a simple login form portlet that uses a backing file to do much security checking, authentication against ActiveDir, etc. Our requirement is to convert to WLP 10.3 using the DVT enabler portlet or something like it for login (because DVT/DISC is to be turned on for the portal). will it be possible to specify that backing file against the DVT enabler portlet?

    I'm not sure using the DVT enabler portlet will do what you want. It basically just specifies the render dependencies to bring in the dojo and dvt javascript libraries. It doesn't provide any login support itself; the javascript it brings responds to the logged-in state of the user (accessed via DISC), so something else is required to login the user.
    Greg

  • No Backing File in Portlet

    Hi All,
    Is there any possibility of not having a backing file when we are implementing the IPC (Inter-Portlet Communication) in our portal application ??
    Thanks in Advance
    Portal Developer

    Hello,
    A backing file is not needed unless you want to do something "custom" with the events your portlet receives. All the options listed at http://edocs.bea.com/wlp/docs102/portlets/ipc.html#wp1055503 can be specified in your .portlet file, and only "invoke backing file method" actually requires a backing file.
    Kevin

  • Backing File to Header Portlet

    Hi,
    I associated a backing file to the Header Porlet(JPF portlet). I want to fire an event from there. I wrote the logic in preRender of the backing file .
    Nothing is happening. I cant even get the log statements .
    Can anybody help me on this

    Hello,
    Unfortunately, portlets in the header and footer cannot be used to send events. This is because they are rendered "outside" of the normal page and don't get access to the PortletBackingContext needed to send events.
    Kevin

  • Alternative approaches for Portlet backing File

    Hi All,
    What would be the best alternate approach if i need to replace all the portlet backing files?
    Thanks in Advance,
    Mohan

    Hello Mohan,
    Can you describe your issue in more detail? Why would you need to replace the backing files, and what would you be replacing them with?
    Kevin

Maybe you are looking for

  • Free goods issue from vendor consignmemtn stock

    Hai Friends, I am doing here delivery thru vendor consignment stock. When i do the delivery  with 601 k  movement type. for that quantity vendor liability will be booked thru MRKO Transaction.  this process is going smoothly.  But i got problem in Fr

  • AC 5.3 RAR: Adhoc analysis

    Hi experts, today we added another client (new source) from the ERP system to Access Control. Thus we have 2 clients from one ERP system and another seperate ERP system connected to Access Control. We also updated the functions for the new system and

  • Error when working with TableView using JCA

    Hi sdns, I am getting an iview rutnime error when working with Tableview using JCA. Here i am putting all my code, go thorugh it and tell me if any error is there.One more thing is Usermappping and all properties are set to system object. Now you can

  • Multiple Sales Order in one Delivery Order

    Is it possible to create a delivery order with multiple sales order in it ? Does it need any additional configuration or the basic SD Module in SAP can support this kind of transaction? Anyone can advise me on this issue as my experience in SAP SD Mo

  • How do you autostart services??

    Hi, I was running OSX Server 10.4.8 in an entirely mac environment. We have recently purchased a PC which needs to connect up to the fileshare. Setting up windows services and getting the PC mac to share is no problem. However, because I didn't speci