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

Similar Messages

  • Multilanguage - set chart title dynamically

    Hello members!
    I am developing a product which should support multilanguage support. This includes the crystal reports.
    After reading different threads on this topic, I got the idea to set the text dynamically. To achieve this solution, I need to read all texts that could be set via the code. For the TextObject and FieldHeadingObject, I got the following code to add the current text to a ResXResourceWriter:
    ReportDocument report = new ReportDocument();
    ResXResourceWriter resXWriter = New ResXResourceWriter(pathToResourceFile);
    foreach( ReportObject reportObject in report.ReportDefinition.ReportObjects)
       if(reportObject.Kind == ReportObjectKind.TextObject ||
          reportObject.Kind == ReportObjectKind.FieldHeadingObject)
           resXWriter.AddResource(reportObject.Name, ((TextObject)reportObject).Text);
    How can I read the text from the chart titles and legends? Has someone any idea?
    Thank you
    Alex

    Hello Ludek!
    With the help of the following thread
    .net TextObject with embedded Fields Question I got an idea how to achieve the first goal.
    I modified the code to read the different titles from the chart object and store the values in the resx file. The supplied resource value (GroupTitle, DataTitle, Subtitle, SeriesTitle and the Title) should be checked for null.
    public void GetTitlesFromChartObject(string reportFilePath, string resourceFilePath)
        ResXResourceWriter resXWriter = new ResXResourceWriter(resourceFilePath);
        CrystalDecisions.CrystalReports.Engine.ReportDocument myReportDocument = new CrystalDecisions.CrystalReports.Engine.ReportDocument();
        CrystalDecisions.ReportAppServer.ClientDoc.ISCDReportClientDocument rasClientDocument;
        CrystalDecisions.ReportAppServer.Controllers.ReportObjectController rasObjectControler;
        CrystalDecisions.ReportAppServer.ReportDefModel.ChartObject rasChartObject;
        //load the report
        myReportDocument.Load(reportFilePath);
        rasClientDocument = myReportDocument.ReportClientDocument;
        rasObjectControler = rasClientDocument.ReportDefController.ReportObjectController;
        foreach (CrystalDecisions.ReportAppServer.ReportDefModel.ReportObject rasReportObject
        in rasObjectControler.GetReportObjectsByKind(CrReportObjectKindEnum.crReportObjectKindChart))
            rasChartObject = (CrystalDecisions.ReportAppServer.ReportDefModel.ChartObject)rasReportObject;
            resXWriter.AddResource(rasChartObject.Name.ToString() + ".Title", rasChartObject.ChartStyle.TextOptions.Title.ToString());
            resXWriter.AddResource(rasChartObject.Name.ToString() + ".GroupTitle", rasChartObject.ChartStyle.TextOptions.GroupTitle.ToString());
            resXWriter.AddResource(rasChartObject.Name.ToString() + ".DataTitle", rasChartObject.ChartStyle.TextOptions.DataTitle.ToString());
       resXWriter.Close();
    Thank you for your help
    Alex

  • Set page title dynamically

    Hi,
    I am trying to set page title programmatically.
    I am calling following in prerender method but it is not working
    this.getHead1().setTitle("This is new title");Any idea, what can I do achieve the same?
    Thanks.

    hi
    this can be done by goinig to design view ,, then make sure that no component of the page ( if there exixt ) is not selected
    then go to properties palette ,, and choose the smale button opposit TITLE and make data bidning with any object u want

  • Setting Page Title Dynamically in OAF

    Hello All,
    I have a Requirement wherein i have to display a 'Welcome <UserName>' message at the top of a OAF page.
    I want to implement this using the 'Title' propery of the Page.
    Is there any way to set the Title of a Page Programatically(by checking the value of a VO/EO Attribute.)
    (OR)
    Is there any other way to implement this functionality.
    Any inputs on this will be really helpful.
    Thanks & Regards,
    Satya

    Hi satya,
    The same thred posted twicely,so pls close this to avoid confusion in searching thred's.
    oracle.apps.fnd.framework.webui.beans.layout.OAPageLayoutBean oapagelayoutbean = oapagecontext.getPageLayoutBean();
    oapagelayoutbean.setTitle("PageTitle");
    Regards
    Meher Irk

  • Can I set preview title dynamically in Reports 6i?

    Dows anyone know a way to dynamically change the title that is printed in Preview Window of a report in Reports 6i?
    Thanks in advance

    Hi Chai,
    Yes you can do this in SAP Mobile BI. You would configure alerters in the Web Intelligence report the same way you would for a BI Launchpad user.
    See section 5.15 of the following document for more info
    http://help.sap.com/businessobject/product_guides/sbo41/en/519_mobiOS_admin_en.pdf

  • How can set editor title dynamically

    HI
    I am using oracle forms 6i, in that i am using same editor for different items, i need to change editor title according to changing item, Is it possible in oracle forms 6i.
    Thanks in Advance
    Aneesh

    Hi jeyanthi,
    attached you will find an example.
    Hope it helps.
    Mike
    Attachments:
    Unbenannt 2_LV80.vi ‏13 KB

  • Changing shell, look & feel dynamically in desktop backing file

    (I apologize if this post is showing up twice - I tried posting with
    google groups but it doesn't appear at forums.bea.com, so I wanted to
    post again using xnews to make sure it shows up.)
    I have a backing file that I am using with my desktop and I need to be
    able to change the shell and look & feel dynamically, based on the page
    that is currently active. I am doing the following in the preRender()
    method:
    String newLAF = "myLookAndFeel";
    String newShell = "myShell";
    // here is where I would determine the appropriate LAF and shell based on the current page
    customizationContext = new CustomizationContext(Locale.getDefault(), request);
    customizationContext.setVisitorMode(true);
    DesktopView desktopView =
    PortalBeanManager.getPortalCustomizationManager().getDesktopView(customizationContext, webAppName, new PortalPath(portalPath), new DesktopPath(desktopPath));
    DesktopInstanceId dii = desktopView.getDesktopInstanceId();
    DesktopInstance di = PortalBeanManager.getPortalCustomizationManager().getDesktopInstance(customizationContext, dii);
    LookAndFeelDefinitionId lookAndFeelId = null;
    for(int i = 0, n = lookAndFeelDefinitions.length; i < n; i++) {
    if(newLAF.equals(lookAndFeelDefinitions.getDefinitionLabel())) {
    lookAndFeelId = lookAndFeelDefinitions[i].getLookAndFeelDefinitionId();
    break;
    di.setLookAndFeelDefinitionId(lookAndFeelId);
    ShellDefinitionManager shellManager = PortalBeanManager.getShellDefinitionManager();
    ShellDefinitionId shellId = null;
    ShellDefinition[] shellDefinitions = getShellDefinitions(webAppName, request.getLocale(), request);
    for(int i = 0, n = shellDefinitions.length; i < n; i++) {
    String shellName = shellManager.getShellView(customizationContext, shellDefinitions[i].getShellDefinitionId()).getMarkupView().getMarkupDefinition().getName();
    if(newShell.equals(shellName)) {
    shellId = shellDefinitions[i].getShellDefinitionId();
    break;
    di.setShellDefinitionId(shellId);
    PortalBeanManager.getPortalCustomizationManager().updateDesktopInstance(customizationContext, di);
    This works just fine, but I once the portal renders itself in my
    browser, I usually have to refresh the page before the changes to the
    shell and look & feel are visible. I would like to do this in the
    init() method of the backing file but I do not know how to determine
    the current active page from within init.
    I would appreciate any help you all could give me in finding a solution
    so I do not have to refresh the page in order to see the shell and look
    & feel changes. Thanks in advance!
    Andy

    We essentially have 2 "portals" running inside 1 .portal file. We'd
    like to be able to use single sign on and entitlements to allow/restrict
    access to various parts of the 2 portals (where certain books are
    consider part of portal "A" and others part of portal "B"). If you are
    logged in as a super-user, you will be able to access everything. If
    you are logged in as user type "A" you can only access portal "A," and
    similarly for user type "B" and portal "B."
    Portals A and B have each have a distinct header, footer (i.e. shell),
    and look and feel (skeleton and skin). If a super-user is looking at
    portal A, the portal should have portal A's header, footer, and look and
    feel, and similarly for portal B.
    How would you recommend we accomplish this? Would it make more sense
    (and is it possible) to have the header and footer jsps determine what
    content to render based on the current book or page, and then use the
    code you suggested below to change the look and feel dynamically?
    Thanks,
    Andy
    jolleyc wrote:
    in order to pick up the changes for that request you will need to do a redirect back to the server (our login examples shwo you how to do this). this is because the control tree has already been retrieved from the database (so you need to go back and get a new version).
    I quick note: If you plan on doing this a lot this is quite a heavy process. if you just need to change the lookAndFeel on the fly you can look at the following ( i t think this is in the tutorial portal)
    A) Modify the shell to include a jsp and backing file
    <netuix:header>
    <netuix:jspContent backingFile="com.acme.DynamicLookAndFeelHeaderBacking" contentUri="/portlets/lookAndFeel/dynamicLookAndFeelHeader/dynamicLookAndFeelHeader.jsp"/>
    </netuix:header>
    B) backing file looks like
    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)
    session.setAttribute("skin", "default");
    if (request.getParameter("textButton") != null)
    session.setAttribute("skin", "text");
    if (request.getParameter("classicButton") != null)
    session.setAttribute("skin", "classic");
    String selectedSkin = (String) session.getAttribute("skin");
    if (selectedSkin != null)
    lookAndFeel.setSkin(selectedSkin);
    lookAndFeel.setSkeleton(selectedSkin);
    lookAndFeel.reinit();

  • 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();
    }

  • 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

  • Setting the title for File download dialog when using content-disposition

    I am trying to send a file from server to client (browser). I am setting the content type of the resopnse and using the "content-disposition" header and giving the filename.
    But the issue is, when it is downloading and the dialog box is showing the progress bar, The title of the dialog box is showing something like "40% of localhost:9080.....". It doesn't show the file name in the title bar. Also, if the URL is very long (I am passing some get parameters and the servlet name is also long), I get junk characters like small boxes.
    How to set this title in the servlet?

    Is there a reason why you have to use FileReference.Save versus File.browseForSave?  In Adobe AIR, the File class, which extends the FileReference class,    provides more capabilities and has less security restrictions than the FileReference class.  Using File.browseForSave, it has a title:String parameter which is a string that is diplayed in the title bar of the dialog box.

  • Desktop Backing File in Production - How?

    Hello.
    Is there a way to associate a desktop backing file with a production desktop? (i.e one created entirely out of portal admin - NOT a .portal file).
    I know you can create a desktop based upon a .portal file - is this the only way it can be achieved?
    Can't find another way...
    Any help much appreciated.
    Weblogic 8.1 Portal. Service Pack 4.

    Hello,
    The browser could be caching the old version. The easiest/quickest way around this (and a pretty good practice IMHO) is to version your files, i.e. instead -
    <script src="fizzbang.js" type="text/javascript"></script>consider using -
    <script src="fizzbang_01.js" type="text/javascript"></script>then when you modify the script, you simply increment -
    <script src="fizzbang_02.js" type="text/javascript"></script>the point here is that from the browsers perspective this is an entirely new file (different filename) so it will need to fetch the file from the webserver rather than using a cached version.
    Hope this helps,
    John.
    Blog: http://jes.blogs.shellprompt.net
    Work: http://www.apex-evangelists.com
    Author of Pro Application Express: http://tinyurl.com/3gu7cd
    REWARDS: Please remember to mark helpful or correct posts on the forum, not just for my answers but for everyone!

  • Data from itab to be store in text file in desktop

    hi
    i am tyring to store the data from itab into a text file in desktop,but its now owrking.
    i am using open dataset statment,but no where data is storing.My code:
    TYPES : BEGIN OF ST_DEMO,
    REG_NO(10) TYPE C,
    NAME(20)   TYPE C,
    ADDR(20)   TYPE C,
    END OF ST_DEMO.
    DATA : WA_DEMO TYPE ST_DEMO,
    IT_DEMO TYPE TABLE OF ST_DEMO,
    L_FNAME TYPE dxfile-filename .
    PARAMETERS: P_FNAME(128) TYPE C DEFAULT '\usr\sap\put\vipin.txt' OBLIGATORY.
    L_FNAME = P_FNAME.
    WA_DEMO-REG_NO = '100001'.
    WA_DEMO-NAME = 'ANAND'.
    WA_DEMO-ADDR = 'NAGARKOVIL'.
    APPEND WA_DEMO TO IT_DEMO.
    OPEN DATASET L_FNAME FOR OUTPUT IN TEXT MODE ENCODING DEFAULT.
    WRITE :5 'REG NUM',16 'NAME',37 'ADDRESS' .
    LOOP AT IT_DEMO INTO WA_DEMO.
      IF SY-SUBRC = 0.
        TRANSFER WA_DEMO TO L_FNAME.
        WRITE :/5 WA_DEMO-REG_NO,16 WA_DEMO-NAME,37 WA_DEMO-ADDR.
      ENDIF.
    ENDLOOP.
    close DATASET L_FNAME.
    please tell me where is the prob?I wan to schedule it for background job.
    regds
    vipin

    hi
    here is the code for :  "data from itab to be store in text file in desktop"
    TABLES: vbak.    " standard table
    *                           Type Pools                                 *
    TYPE-POOLS: slis.
    *                     Global Structure Definitions                     *
    *-- Structure to hold data from table CE1MCK2
    TYPES: BEGIN OF tp_itab1,
           vbeln LIKE vbap-vbeln,
           posnr LIKE vbap-posnr,
           werks LIKE vbap-werks,
           lgort LIKE vbap-lgort,
           END OF tp_itab1.
    *-- Data Declaration
    DATA: t_itab1 TYPE TABLE OF tp_itab1.
    DATA : i_fieldcat TYPE slis_t_fieldcat_alv.
    *                    Selection  Screen                                 *
    *--Sales document-block
    SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-t01.
    SELECT-OPTIONS: s_vbeln FOR vbak-vbeln.
    SELECTION-SCREEN END OF  BLOCK b1.
    *--Display option - block
    SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE text-t02.
    PARAMETERS: alv_list RADIOBUTTON GROUP g1,
                alv_grid RADIOBUTTON GROUP g1.
    SELECTION-SCREEN END OF  BLOCK b2.
    *file download - block
    SELECTION-SCREEN BEGIN OF BLOCK b3 WITH FRAME TITLE text-t03.
    PARAMETERS: topc AS CHECKBOX,
                p_file TYPE rlgrap-filename.
    SELECTION-SCREEN END OF  BLOCK b3.
    *                      Initialization.                                *
    *                      At Selection Screen                            *
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
      CALL FUNCTION 'F4_DXFILENAME_4_DYNP'
        EXPORTING
          dynpfield_filename = 'P_FILE'
          dyname             = sy-cprog
          dynumb             = sy-dynnr
          filetype           = 'P'      "P-->Physical
          location           = 'P'     "P Presentation Srever
          server             = space.
    AT SELECTION-SCREEN ON s_vbeln.
      PERFORM vbeln_validate.
    *                           Start Of Selection                         *
    START-OF-SELECTION.
    *-- Fetching all the required data into the internal table
      PERFORM select_data.
    *                           End Of Selection                           *
    END-OF-SELECTION.
      IF t_itab1[] IS NOT INITIAL.
        IF topc IS NOT INITIAL.
          PERFORM download.
          MESSAGE 'Data Download Completed' TYPE 'S'.
        ENDIF.
        PERFORM display.
      ELSE.
        MESSAGE 'No Records Found' TYPE 'I'.
      ENDIF.
    *                           Top Of Page Event                          *
    TOP-OF-PAGE.
    *& Form           :      select_data
    * Description     : Fetching all the data into the internal tables
    *  parameters    :  none
    FORM select_data .
      SELECT vbeln
         posnr
         werks
         lgort
         INTO CORRESPONDING  FIELDS OF TABLE t_itab1
         FROM vbap
         WHERE  vbeln IN s_vbeln.
      IF sy-subrc <> 0.
        MESSAGE 'Enter The Valid Sales Document Number'(t04) TYPE 'I'.
        EXIT.
      ENDIF.
    ENDFORM.                    " select_data
    *& Form        : display
    *  decription  : to display data in given format
    * parameters   :  none
    FORM display .
      IF alv_list = 'X'.
        PERFORM build_fieldcat TABLES i_fieldcat[]
                               USING :
    *-Output-field Table      Len  Ref fld Ref tab Heading    Col_pos
       'VBELN'       'T_ITAB1'     10   'VBAP'  'VBELN'    ''            1,
       'POSNR'       'T_ITAB1'     6    'VBAP'  'POSNR'    ''            2,
       'WERKS'       'T_ITAB1'     4    'VBAP'  'WERKS'    ''            3,
       'LGORT'       'T_ITAB1'     4    'VBAP'  'LGORT'    ''            4.
        CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
          EXPORTING
            i_callback_program       = sy-repid
    *        i_callback_pf_status_set = c_pf_status
            i_callback_user_command  = 'USER_COMMAND '
    *        it_events                = t_alv_events[]
            it_fieldcat              = i_fieldcat[]
          TABLES
            t_outtab                 = t_itab1[]
          EXCEPTIONS
            program_error            = 1
            OTHERS                   = 2.
        IF sy-subrc <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
        ENDIF.
      ENDIF.
      IF alv_grid = 'X'.
        PERFORM build_fieldcat TABLES i_fieldcat[]
                                 USING :
    *-Output-field Table      Len  Ref fld Ref tab Heading    Col_pos
         'VBELN'       'T_ITAB1'     10   'VBAP'  'VBELN'    ''            1,
         'POSNR'       'T_ITAB1'     6    'VBAP'  'POSNR'    ''            2,
         'WERKS'       'T_ITAB1'     4    'VBAP'  'WERKS'    ''            3,
         'LGORT'       'T_ITAB1'     4    'VBAP'  'LGORT'    ''            4.
        CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
          EXPORTING
            i_callback_program       = sy-repid
    *        i_callback_pf_status_set = c_pf_status
            i_callback_user_command  = 'USER_COMMAND '
            it_fieldcat              = i_fieldcat
          TABLES
            t_outtab                 = t_itab1[]
        EXCEPTIONS
       program_error                     = 1
       OTHERS                            = 2.
        IF sy-subrc <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
        ENDIF.
      ENDIF.
    ENDFORM.                    " display
    *& Form        : vbeln_validate
    *  description : to validate sales document number
    * parameters   :  none
    FORM vbeln_validate .
      DATA: l_vbeln TYPE vbak-vbeln.
      SELECT SINGLE vbeln
        FROM vbak
        INTO l_vbeln
        WHERE vbeln IN s_vbeln.
      IF sy-subrc NE 0.
        MESSAGE 'ENTER THE VALID SALES DOCUMENT NO:' TYPE 'I'.
        EXIT.
      ENDIF.
    ENDFORM.                    " vbeln_validate
    *& Form       :build_fieldcat
    * Description : This routine fills field-catalogue
    *  Prameters  : none
    FORM build_fieldcat TABLES  fpt_fieldcat TYPE slis_t_fieldcat_alv
                        USING   fp_field     TYPE slis_fieldname
                                fp_table     TYPE slis_tabname
                                fp_length    TYPE dd03p-outputlen
                                fp_ref_tab   TYPE dd03p-tabname
                                fp_ref_fld   TYPE dd03p-fieldname
                                fp_seltext   TYPE dd03p-scrtext_l
                                fp_col_pos   TYPE sy-cucol.
    *-- Local data declaration
      DATA:   wl_fieldcat TYPE slis_fieldcat_alv.
    *-- Clear WorkArea
      wl_fieldcat-fieldname       = fp_field.
      wl_fieldcat-tabname         = fp_table.
      wl_fieldcat-outputlen       = fp_length.
      wl_fieldcat-ref_tabname     = fp_ref_tab.
      wl_fieldcat-ref_fieldname   = fp_ref_fld.
      wl_fieldcat-seltext_l       = fp_seltext.
      wl_fieldcat-col_pos         = fp_col_pos.
    *-- Update Field Catalog Table
      APPEND wl_fieldcat  TO  fpt_fieldcat.
    ENDFORM.                    "build_fieldcat
    *& Form        : download
    *  description : To Download The Data
    *  Parameters  :  none
    FORM download .
      DATA: l_file TYPE string.
      l_file = p_file.
      CALL FUNCTION 'GUI_DOWNLOAD'
        EXPORTING
          filename                = l_file
          filetype                = 'ASC'
        TABLES
          data_tab                = t_itab1
        EXCEPTIONS
          file_write_error        = 1
          no_batch                = 2
          gui_refuse_filetransfer = 3
          invalid_type            = 4
          no_authority            = 5
          unknown_error           = 6.
      IF sy-subrc <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    ENDFORM.                    " download
    hope it will help you
    regards
    rahul

  • No backing file methods in dropdown

    I am working through the <b>Establishing Interportlet Communications by Using Custom and Page Flow Event Handlers: An Example</b>http://edocs.bea.com/wlp/docs81/ipcguide/custevent.html#999127
    I have created my backing files in step2 and have completed much of step 3. However, when I get to the point in the tutorial where I am to choose the backing file method, there is nothing in the dropdown. The backing files have been compiled and the classes are in WEB-INF/classes/backing folder.
    Any ideas what might be causing this?

    Stephen Davidson wrote:
    I am working through the <b>Establishing Interportlet Communications by Using Custom and Page Flow Event Handlers: An Example</b>http://edocs.bea.com/wlp/docs81/ipcguide/custevent.html#999127
    I have created my backing files in step2 and have completed much of step 3. However, when I get to the point in the tutorial where I am to choose the backing file method, there is nothing in the dropdown. The backing files have been compiled and the classes are in WEB-INF/classes/backing folder.
    Any ideas what might be causing this?I think that you just point to the backing file and not a method
    specifically. If you override the preRender method, it always gets
    executed prior to rendering whatever resource (desktop, book, page or
    portlet you have it bound to) and if you override the handlePostBack
    method, it gets executed whenenever you do post back to the portal.

  • 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.

  • 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

Maybe you are looking for

  • Skype uses DVB-T card as camera

    I have problem with Skype, because it uses TV card as video, so Skype uses CPU on 100%. I want to disable Skype using TV card. Skype 3.6 works OK, 4.0 and above is bad for me. CPU is P 4 2GHz, 2 GB RAM.

  • Creating multiple links from one map image in Flash CS4

    I have been tasked with creating multiple links from one map image using flash. Each link would go to the main website page with that location. I assume I could create a button for each location on the map but not having a lot of experience any help

  • An iPhone case that prevents bending?

    Here's my idea for an iPhone case that prevents bending: Get a case like the one shown that takes cards, and put in a piece of steel, or if you're worried about the weight, titanium. My thinking is that should make the case rigid enough to prevent be

  • Sync ipod to new comp

    i've just brought a new computer, and when trying to sync it with my ipod touch its says ill loose all my paid apps, is there anyway around this?

  • PE 9 and Cubase

    I can only hope that I won't have to rename my Cubase VST directory just to make PE work.  That's been a problem with every version I've used since 4.0