Changing Portlet header text dynamically

I trying to change the Portlet header text depending on the value of a selected page parameter. e.g. I selected the FTSE 100 stocks link on a page and I want the portlet to display the list of stocks and the banner to say "FTSE 100" similarly if I pick the NASDAQ link I want the same portlet to list the NASDAQ stocks and the banner to say "NASDAQ". I have the stocks changing using dynamic pages and page parameters but I can't seem to get at the portlet banner title variable. I working on the latest portal release.

Hi Lisa,
It just so happens that the "Portlet Wizard" in JDeveloper creates the default edit view to modify the page title. Here is the code it created:
<pre>
// Get the PortletRenderRequest and Writer
PortletRenderRequest pr = (PortletRenderRequest)request.getAttribute(HttpCommonConstants.PORTLET_RENDER_REQUEST);
PrintWriter out = pr.getWriter();
// Display a greeting
String userName = pr.getUser().getName();
out.println("<p>Hello " + userName + ".</p>");
out.println("<p>This is the <b><i>Edit</b></i> render mode!</p>");
// Customize the portlet title
String actionParam = PortletRendererUtil.getEditFormParameter(pr);
String action = request.getParameter(actionParam);
String title = pr.getParameter("filebrowse_title");
NameValuePersonalizationObject data = null;
try
data = (NameValuePersonalizationObject)PortletRendererUtil.getEditData(pr);
catch(AccessControlException ae)
throw new ServletException(ae);
catch(PortletNotFoundException pnfe)
throw new ServletException(pnfe);
// Cancel automatically redirects to the page, so
// will only recieve OK or APPLY
if (action != null)
data.setPortletTitle(title);
try
PortletRendererUtil.submitEditData(pr, data);
catch(AccessControlException ae)
throw new ServletException(ae);
return;
// Otherwise just render the form
title = data.getPortletTitle();
out.println("<table border='0'><td width='20%'>");
out.println("<p align='right'>Title:</p></td><td width='80%'>");
out.println("<input type='TEXT' name='filebrowse_title' value='" + title + "'>");
out.println("</td></table>");
</pre>
I hope this helps!!!
-Sean

Similar Messages

  • Change column header text dynamically

    Hi,
    I have requirement to change the column header text dynamically in sap gui programming. but couldn't see straight forward way to achieve this.
    i tried following link but no success:
    [Re: Dynamic header text in table control - Dialog programming;
    Please share your suggestions if it can be acheived.
    Thanks,
    Rahul
    Edited by: Rahul Yadav on Oct 25, 2010 7:29 PM

    >
    anmol112 wrote:
    > Hi,
    >   So you can try 1 thing,
    > * Dont use default Column Headings
    > * Create I/O and choose ouput only and fix them in place of Column headings.
    > * pass the values to these I/O accordingly.
    >
    >
    > Thanks,
    > Anmol.
    How is this different from the previous post?
    Rob

  • Change Table control Column Header text dynamically

    Hi,
    I have an requirement to change table control column header text dynamically.
    i.e. I have about 10 columns in table control, out that need to change 5 columns header text. These header texts are stored in an internal table.
    I had looked into the below link but could not get exactly how to do it.
    Dynamic headers in table control
    Could you please tell me how to do that.
    Thanks in Advance.

    Hi Saba,
    What you will need to do is this.....
    1. First replace the column Header Text box by I/O Fields and name them accordingly.
    Say for example we will consider the same example which i had explained in the link.
    there in the column header we want the header to change when some dates and entered into two fields which are out of table control say
    Start Date: 01.01.2010 to End Date: 06.01.2010
    Now we want the header to look like this,
    Column  No.    -        1               2             3                  4               5               6
    Header label   -    01/FRI       02/SAT     03/SUN       04/MON     05/TUE      06/WED
    Header name -    SPOTS1   SPOTS2    SPOTS3      SPOTS4     SPOTS5    SPOTS6
    then you go as per the instructions in the link......
    Let me know if you need further help,
    Hope this solves your problem....
    Regards,
    Abhijit G. Borkar

  • To change the header text of Purchase order using BAPI

    Hi,
    I am using BAPI_PO_CHANGE to change the header text of PO. But it s not reflecting. Can anyone help me by providing solution for this.
    <i><b>Points will be rewarded for the useful answers.</b></i>

    Hi,
    I need to change the text using this BAPI alone. I am using this because i need to change many parameters of PO.
    Can u please say me solution using BAPI_PO_CHANGE. I need to know what are all the parameters need to be passed to BAPI to change the text.
    Thank you for replying.

  • User exit/BADi to change the header text in MIRO transaction

    Hi all,
    I am searching user exit or badi to change the header text in MIRO transaction.
    My requirement is, before post the invoice I need to populate the vendor name in Header text field(MIRO -> Details tab -> header text field ). I have tried all the user exits and BADi's related to MIRO. Doesn't work. If anybody knows please share.
    Thanks,
    Pranav

    Try BADI INVOICE_UPDATE.
    If you are in system version is ECC 6.0, you can find out a Enhancement SPOT (ES_SAPLMRMC) under Function module MRM_FINAL_CHECK, which can be used to perform this requirement
    Hope this helps.
    Thanks,
    Balaji
    Edited by: Balaji Ganapathiraman on Mar 14, 2008 4:43 PM

  • How to change the header text on output type in sapscript

    Dear All,
    In the sapscript, I would like to changes the header text from invoice number to sales number on the output type z001.
    Could someone can guide me?
    Thanks.

    Hi,
    Please go through following link :
    http://forums.adobe.com/thread/870081#870081
    Thanks and Regards,
    Vibhuti Gosavi | [email protected] | www.infocepts.com

  • Is there any bapi/Function module to change only header text in fb02

    Hi ,
    I want to change only header text in FB02 .the header text will come  from a internal table.My Requirement is
    1. open a document in FB02
    2.change the header text of the document.
    Right now i'm doing this through an BDC.but i'm looking for a BAPI /FM.
    I Tried bapi_acc_gl_posting_post, fI_document_change..
    is there any BAPI/FM for this???
    Thanks,
    Challa

    You can use SAVE_TEXT FM
    Thanks
    Seshu

  • Hi! How can I change the header text direction to vertical?

    I have many columns with big names, but I need small space for body cells, and I want to check all the table at a view ...  So I want to change the direction of the header texts to "left vertical" or "right vertical".

    There are a couple discussion threads on this already.  Fundamentally it is not a feature that Numbers supports.  There are several work arounds but non of theeem are great:
    Please see this thread:
    https://discussions.apple.com/message/15240103#15240103

  • FB02 does not allow to change Document Header Text

    Hi,
    We are upgrading to ECC 6.00. In T Code FB02 we are not able to change the document header text (BKPF-BKTXT). This feild is grayed out.
    We have done the necessary configuration in Document Change Rules, Document Header- allowing BKPF-BKTXT for change.
    We can see the entry in Table V_TBAER. Please help me to solve this problem. We need to have this feild available for change.
    Regards
    Santosh Hegde

    hi Santosh,
    I understand that you can see the entry (BKPFT-BKTXT) in V_TBAER, but there are two small things to consider: if you doubleclick the line (in V_TBAER), there are two checkboxes, where the first one has to be ticked (field is changable), if the second checkbox is ticked as well, it means the field can be changed if the posting period is open. pls. check just in case...
    if it does not help, I would suggest to open an OSS call about this problem (I did search on my own, but no luck), could be some special SAP error.
    ec

  • Changing Column header text ol ALV: Object ref cl_salv_table

    Hi Friends,
    my code:
    TRY.
              CALL METHOD cl_salv_table=>factory(
                EXPORTING
                  r_container    = gv_custom_container
                  container_name = 'CUSTOM_300'
                IMPORTING
                  r_salv_table   = gr_table
                CHANGING
                  t_table        = gt_itab_email ).
            CATCH cx_salv_msg.                              "#EC NO_HANDLER
            CLEANUP.
          ENDTRY.
    activate ALV generic Functions
          DATA: lr_functions TYPE REF TO cl_salv_functions_list.
          TRY.
              lr_functions  = gr_table->get_functions( ).
              lr_functions->set_default( abap_true ).
              gr_columns = gr_table->get_columns( ).
             PERFORM change_columns_text USING gr_columns.
              gr_columns->set_exception_column( value = 'LIGHTS' ).
            CATCH cx_salv_data_error.
            CLEANUP.
          ENDTRY.
          CALL METHOD gr_table->display.
    Problem:
    Can someone give me tips on how to change the Column text of the return table gr_table in my code.
    I would like to change the text before CALL METHOD gr_table->display.
    Thanks
    Blacky

    You need to get the perticular column object from the COLUMNS object
    Like:
      data: lr_columns type ref to cl_salv_columns_table,
            lr_column  type ref to cl_salv_column_table.
      lr_columns = gr_table->get_columns( ).
      try.
          lr_column ?= lr_columns->get_column( 'FIELD1' ).
          lr_column->set_short_text( 'Custom Text' ).
          lr_column->set_medium_text( 'Custom Text' ).
          lr_column->set_long_text( 'Custom Text' ).
        catch cx_salv_not_found.                            "#EC NO_HANDLER
      endtry.
    Check report: SALV_DEMO_TABLE_COLUMNS
    Regards,
    Naimesh Patel

  • How can i change column header value dynamically in IR report

    HI,
    I have created report with the help of collections. Report query has been changing dynamically but i got problem with report header names and headers names has not been changing dynamically it is always showing like c001,c002....etc so, i have created global item(G_ITEM) in shared components--->Applications items after that
    I have created process(before headers) and assigning some value to G_ITEM and used &G_ITEM to column headres in IR Report but here &G_ITEM is not showing any value.
    How can i achieve dynamic headers names by using *&G_ITEM(global items)* Please guide me to achieve this.
    Thanks in advance.
    Regards
    Narender B

    Narender wrote:
    HI,
    I have created report with the help of collections. Report query has been changing dynamically but i got problem with report header names and headers names has not been changing dynamically it is always showing like c001,c002....etc so, i have created global item(G_ITEM) in shared components--->Applications items after thatWhy didn't you answer the questions in the other thread to see if there was a better approach than this?
    I have created process(before headers) and assigning some value to G_ITEM and used &G_ITEM to column headres in IR Report but here &G_ITEM is not showing any value.
    How can i achieve dynamic headers names by using *&G_ITEM(global items)* Please guide me to achieve this.The static text exact substitution method of referencing the value of an APEX item requires a terminating dot ("."):
    &G_ITEM.

  • How to change the header text of documents posted to FI from accrual engine

    Dear experts,
    could anybody explain us step by step how we can get a different header or position text into transaction ACACTREE01, which can can be shown in FI or CO-Reporting.
    Kind Regards
    Sladinky

    Hi Sladinky,
    Can you please suggest this in case you have already implemented it ?
    Thanks,
    Sourav

  • How to change the header text fontFamily of spark DataGrid?

    I use an embed font (Nunito-Light.ttf),  and i can set the font of GridColumn to Nunito-Light in DataGrid , but it seems that it has no effect to the header of DataGrid.
    and then I create a  headerRenderer for spark DataGrid, and try to set the fontFamily of "labelDisplay" to Nunito-Light  , but It seems still no effect .
    If I set the fontFamily of "labelDisplay" to "Verdana" or "Arial" , it has effect , so strange! Is that a bug?
    Anybody  has the same problem? Please tell me how to solve it ,thank you very much!

    Hi,
    Please go through following link :
    http://forums.adobe.com/thread/870081#870081
    Thanks and Regards,
    Vibhuti Gosavi | [email protected] | www.infocepts.com

  • My TOC does not update automatically when I change the header text of a chapter

    Some chapters do; others don't. Anybody?
    Thanks

    The current version is 10.2.2, and that's why your iTunes hasn't automatically updated. Any currently available version of iCloud is a beta only, and so iTunes will not automatically update via Software Update
    When you do update, you won't lose any of your current iTunes Library. If you want to be sure, back up the library which, by default is in <your user name>/Music. If you copy the whole /Music folder, you'll be absolutely sure.

  • Dynamic header text in table control - Dialog programming

    Hi All,
    I have a table control on one of my dialog screens.  I need to dynamically change the column header texts on this control in my PBO.  Does anyone know how to do this?  I have found all kinds of ways to modify the other characteristics of the fields at run time in the PBO (active, input/output, invisible, etc.) - but not to change the header text!  Any help is appreciated.
    thanks,
    Matt

    Hi Hymavathi,
    I appreciate your help!  This didn't solve the issue, however,...I have used the method you'd mentioned before (many times) for setting it inside the loop at screen:
    %_<screenname>_%_APP_%-TEXT = <text something>.
    - but only in ABAP reports.  It doesn't seem to recogize it (the table control column header text) within a dialog program.  I keep getting a compile error. (saying that the %_<screenname>_%_APP_%-TEXT doesn't exist.
    I tried the suggestion that you stated below (from lateesh) - yet it only let me place i/o field in title text area (not the column header text).  Am still searching...

Maybe you are looking for