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

Similar Messages

  • How can I set the location of the files for My Digital Editions?

    When I installed REader for PC it set up as its file location  a location which makes no sense to me and I want to move it nto My Documents.  How do I do this without REader for PC "losing" its files?

    Adding location data is not yet supported in Photos.
    And we do not know, if future updates will  support this feature. It might help, if you send back feedback to Apple with a feature request. You can use this form:  Apple - Photos - Feedback
    As a work-around, use third party apps to add location data before you import the photos to Photos.
    You could, for example, first import to iPhoto, add the locations, batch change the titles and captions, do all the things that are not yet supported in the new Photos, then export the photos from iPhoto and import them to Photos.
    Or use the free exiftool, if you like the Terminal.
    See:  http://www.sno.phy.queensu.ca/~phil/exiftool/exiftool_pod.html#geotagging_exampl es
    To install exiftool: http://www.sno.phy.queensu.ca/%7Ephil/exiftool/install.html
    Other convenient apps are Jetphoto Studio, Geotagalog, there are many more ..
    I use Jetphoto Studio, but it is not free.

  • Reading back file for analysis purposes controlling X-axis

    Alright, I lose using labview.  I use it for a ton of different projects at work.  I have been fooling around with this for a while and maybe I am just missing it.
    Here goes, in one of my applications I record 4 AI channels at various rates (6, 600, 6000) Hz, I write the data to three different files depending on the record speed.  I create a .txt file using the "write to file" wizard.  I check the option to use one time column.  In the end I get a nice file with 5 columns the first being my time, and the other four being the data on the 4 AI channels. 
     Now I am trying to read this file back to graph and perform some analysis on it.  I have tried this a few different ways, with using charts and graphs.  My question is is there anyway to grab that first column and set it as my x-axis.  Right now the x-axis really dosn't make much sense.  Even if it graphed it as a sample number would be good.  Any help would be greatly appreated.
    Thanks
    Chris

    Hi Chris,
    attached vi will read your data...
    When you rename your txt to .lvm you may also use the "Read from measurement file" function. As I'm not using the dynamic datatype (DDT) (so far) I don't know how to separate the single signal from the output - but it is shown in the properties dialog...
    "Spreadsheet string to array" is located on the string palette - like any other string function too
    Best regards,
    GerdW
    CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
    Kudos are welcome
    Attachments:
    Read_Data_LV85.vi ‏81 KB

  • How do i set system preferences to delete file cache that is not being used

    My file cache is using over a GB of memory.  How do i set the system to free up memory that is being held but not used?

    It's normal since Mavericks for almost all memory to be in use, either by applications or by the file cache. That's what you should want, since unused memory is going to waste. The relevant measure of whether memory is in short supply is what Apple calls "memory pressure."
    Apple's explanation of memory pressure is here. If you want a more detailed, technical description, see here, and for the source code, see here.

  • Can I set a preference so that files don't open when downloaded?

    I'm downloading a series of video files.  I click on each link and they start downloading.  I might have several that are all downloading at once.  While they download I go on to work on something else.  However, when each file finishes downloading, the program I use to view the video opens and I have to take time to close it and go back to work.  Any suggestions?  I'm sure there is a simple solution.  Thanks.

    Safari Preferences>General: at the bottom of the pane uncheck 'Open "Safe" files after downloading'.

  • 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

  • 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

  • Can we override the Desktop LAF for Pages using backing Files ?

    Hi
    I have the following Look And Feel related requirement.
    We have an global application level Skin which was applied at the desktop level using the .laf file.
    But some of the pages require a totally different Look and Feel apart from the one defined at the desktop level.
    To put the question in the other way,
    Can we override the skin & skeleton defined at the Desktop level using the backing file (for page or portlet) ?
    The following is the code snippet, which i used in the backing file to achive the above.
    LookAndFeel lookAndFeel = LookAndFeel.getLookAndFeel(request);
    lookAndFeel.setSkin(y_skin);
    lookAndFeel.setSkeleton(y_skeleton);
         lookAndFeel.reinit();
    Here the y_skin & y_skeleton are the new set of skin & skeletion which i have created for the page.
    when i ran the above snippet in the portal framework, i found the desktop level skin is getting applied
    to the pages insted of the y_skin & y_skeleton.
    Any help or directions .... for dynamically changing the skin & skeletion for pages will be appreciated.
    Thanks & Regards
    - Sachi

    What you are doing looks valid.
    this is the code that i have
    public void init(HttpServletRequest request, HttpServletResponse response)
    // Get the session from the request
    HttpSession session = request.getSession();
    // Get the LookAndFeel object from the PrimaryTheme in the request
    LookAndFeel lookAndFeel = LookAndFeel.getLookAndFeel(request);
    if (request.getParameter("defaultButton") != null)
    //System.out.println("default skin selected");
    session.setAttribute("skin", "default");
    if (request.getParameter("textButton") != null)
    //System.out.println("text skin selected");
    session.setAttribute("skin", "text");
    if (request.getParameter("classicButton") != null)
    //System.out.println("classic skin selected");
    session.setAttribute("skin", "classic");
    String selectedSkin = (String) session.getAttribute("skin");
    if (selectedSkin != null)
    //System.out.println("setting skin and skeleton to: '" + selectedSkin + "'");
    lookAndFeel.setSkin(selectedSkin);
    lookAndFeel.setSkeleton(selectedSkin);
    lookAndFeel.reinit();
    }

  • I am not able to use two backing files in same portal page

    hi to all
    i am using backing files in remote portlet.
    but i have two portlets in my portal page and in both i need to use backing files. i used seperate backing files for both the portlets but only one works at a time.
    please help me out frnds..
    did this happening because of same object MarkupRequestState.KEY..... following is code that i am using. similar code used for another portlet, just a change of state varible and parameter variable
    am i missing something?
    package backempno;
    import javax.servlet.http.HttpServletRequest;
    import javax.servlet.http.HttpServletResponse;
    import com.bea.netuix.servlets.controls.content.backing.AbstractJspBacking;
    import com.bea.wsrp.ext.holders.MarkupRequestState;
    import com.bea.wsrp.ext.holders.SimpleStateHolder;
    public class sendempno extends AbstractJspBacking
    public boolean preRender(HttpServletRequest request,HttpServletResponse response)
    SimpleStateHolder state2 = new SimpleStateHolder();
    String empno=request.getParameter("empno");
    state2.addParameter("empno",empno);
    request.setAttribute(MarkupRequestState.KEY, state2);
    return true;
    }

    Hi Susan,
    In that case I will recommend that you consult a local technician/IT team and see if there is some network connectivity issue with your machine.
    - Abhishek Maurya

  • Changing current page from backing file

    Using WL 8.1 SP4
    I have a User Acceptance Policy page in my portal, and I want to ensure that users have viewed this page before I allow them to view any other content.
    When users have viewed the UAP, I set a session variable. I then use the session variable in my entitlements, so there's no problem with them viewing content they shouldn't.
    The problem I have is that if users try to access a page directly (or their session has expired), they're left with a blank page (as they're not entitled to see anything), rather than being sent to something helpful (i.e. the UAP).
    So I need a backing file. It can either be on every page (except the UAP), or I can put it on the book - whatever is recommended.
    I've tried this as a page backing file:
    public class UAPCheck extends AbstractJspBacking {
    public boolean handlePostbackData(HttpServletRequest request, HttpServletResponse response){
    PageBackingContext pbc = PageBackingContext.getPageBackingContext(request);
    if (pbc.getLabel().equals("uap_page")
    || request.getSession().getAttribute("UAP Accepted") != null){
    return true;
    } else {
    pbc.setupPageChangeEvent("uap_page");
    return true;
    I've applied this to pages in my book, however nothing happens - the page change request never fires!
    So what's happening here? Am I misunderstanding what setupPageChangeEvent is for?
    Help is appreciated.
    darren

    In the past I have done it as follows:
    1. Create a backing file for the book that has these pages.
    2. In the preRender of the backing file do the following
    BookBackingContext bbc=
    BookBackingContext.getBookBackingContext(getRequest());
    if( //check to see if page change event is needed)
    {PageBackingContext pbc_current =
            bbc.getActivePageBackingContext();
        pbc_default.setActive(false);
        PageBackingContext pbc_pageToBeShown=
            bbc.getPageBackingContextByDefinitionLabel("//  
            def label of page to be shown, in your      
            case 'uap_page'");
        pbc_pageToBeShown.setActive(true);
        return true;
    else return true;
    3. link the backing file to book
    Recommendations:
    * Don't use backing files for Portal components if they are not needed. (From your post, if I am not wrong, you are using backing files for all pages in the book which is not necessary and can cause unnecessary complications)
    * Read this doc to understand life-cycle methods of portal components http://edocs.bea.com/wlp/docs81/pdf/taxonomy.pdf
    Peruse the above document to understand what is going wrong with your code.
    * Remember that the life cycle methods for components that are not active will not be rendered if treeOptimizationEnable parameter is set to true ( this parameter can be seen in workshop under property editor)
    * When calling one of the setupxxevent methods, it must be done on the backing context that the backing file is tied to. If you do not do this the event may not get fired. For more info click http://e-docs.bea.com/wlp/docs81/whitepapers/netix/body.html
    Seenu
    Seenu.

  • Portal Backing file -- ClassNotFoundException

    I am using weblogic8.1 SP3. I try to give a backing file for .portal desktop. I put this backing file, PortalBacking.java in the portal project root directory which is the same directory as .portal file. And give PortalBacking.java in Backing File properties. When I run, I got "ClassNotFoundException" for my backing file.
    I put backing file under a directory and give a full path(basically package name to Backing File Properties) and got "ClassNotFoundException" too.
    Can someone tell me what I missing ? Thank you very much for help.

    Find your sampleportal application under weblogic81\samples\portal\portalApp\sampleportal\ .
    You can find some sample backing files under WEB-INF\src\examples\login
    Hope this helps...
    --stefan                                                                                                                                                                                                                                                                                                                                                                                                       

  • Controller Java Page Flow and Backing file

    Hello all,
    I am very confused with the controller and the backing file, for example, I have a login page, I would like to flow to another page after I successfully login, which method I should use.
    Thanks and best regards
    Spencer

    u can use the validation technique provided by the weblogic.

  • 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

  • Setting software preference for file types

    Hi all
    Can someone please tell me how you set a preference for different file types? For example, I want all .avi files to play using VLC player and not Quicktime. However, my computer automatically wants to use Quicktime. How do I change this? I have looked in Preferences and couldn't see an option.
    Thanks
    Steven

    Select an .avi file via the Finder and use Get Info for the file.
    At Open With, select the VCL player and below "use this application to open all documents like this", select Change All.

  • Which files - such as preferences - need to be backed up for Logic 7.2.1?

    I'm trying to create Retrospect scripts to backup the important files of Logic that might need to be replaced if something goes wrong - such as the preferences.
    Anyone have a list of these files and their locations?

    Backed up for 7.2.1?
    7.2.1 installer installs only Logic and the node. If you want to back up your prefs, do so. I trash them after updates.
    From the man:
    Saving of Song Settings and Preferences
    The Song Settings are stored with the song file. If you want to start Logic with certain
    settings, simply make the desired settings in your Autoload song or a Template.
    The Preferences are saved whenever you quit Logic. There are several Preference files,
    which are stored separately in the $/User/Library/Preferences folder. Logic preference
    files all begin with “com.apple.Logic”.
    +++++++++++++++++++++++

Maybe you are looking for

  • T-code F-28 (Post Incoming Payments) - only 16 lines to enter invoice doc

    Hope someone can help me on the following issue: Issue is pertaining to t-code F-28 (Post Incoming Payments). There are only 16 lines for user to enter invoice documents when we select Document Number for the Additional Selection. For some cases, we

  • Error opening ip log file in ethereal

    I get the following error when I try to open an ip log [created by changing the event action to log packets]. "The capture file appears to be damaged or corrupt". Is this a known issue?

  • Seconds to Time Conversion for Display on a Cross-Tab

    Post Author: [email protected] CA Forum: Formula I am doing a cross-tab report of login times for hours logged into a system. In the cross-tab if i use the time, I can't sum. So i have the time converted to seconds to allow for a sum and totals.  Now

  • Apple TV 2 Problems

    I have an Apple TV v2 and the white light blinks rapidly all of the time. I have connected it to my computer using USB cable in the hope I could restore it via iTunes. iTunes will not discover the Apple TV connected. I have followed the troubleshooti

  • Does faster memory make a difference?

    hi, I'm currently building my new system (middle of the road, around 1500€, mainly for AE CS5) and I have a specific question regarding memory: does it make sense to invest in more expensive/faster RAM (1600MHz instead of 1333?)? what I had in mind u