Filter omni portlet output data according to portal user

We have created an omniportlet that connects to a database, and retrives some values into a defined HTML layout.
We want to filter output data according to our portal current user name
When we try to use portal.wwctx_api.get_user inside of omni portlet select statement fallowing error occurs.
Error in executing Query : [ORA-06510: PL/SQL: unhandled user-defined exception ORA-06512: at "PORTAL.WWCTX_SSO", line 1803 ORA-06510: PL/SQL: unhandled user-defined exception ORA-06512: at "PORTAL.WWCTX_SSO", line 1637 ORA-06502: PL/SQL: numeric or value error ORA-06512: at "PORTAL.WWCTX_SSO", line 1865 ORA-06512: at "PORTAL.WWCTX_API", line 183 ]
Thanks a lot

This is because the Omniportlet is actually operating within a different context--a separate database connection from the Portal connection. We have similar issues with Java portlets. You might try creating a public parameter on the portlet, then mapping that to the system variable USER (done on the Parameters tab of the page where you deploy it--if you don't see a parameters tab, you must enable Parameters and Events at the page group properties level). I haven't tested any of this, but it should get you going in the right direction.

Similar Messages

  • Filter output data according to portal current user name in omni portlet

    We have created an omniportlet that connects to a database, and retrives some values into a defined HTML layout.
    We want to filter output data according to our portal current user name
    When we try to use portal.wwctx_api.get_user inside of omni portlet select statement fallowing error occurs.
    Error in executing Query : [ORA-06510: PL/SQL: unhandled user-defined exception ORA-06512: at "PORTAL.WWCTX_SSO", line 1803 ORA-06510: PL/SQL: unhandled user-defined exception ORA-06512: at "PORTAL.WWCTX_SSO", line 1637 ORA-06502: PL/SQL: numeric or value error ORA-06512: at "PORTAL.WWCTX_SSO", line 1865 ORA-06512: at "PORTAL.WWCTX_API", line 183 ]
    Thanks a lot

    hello
    i think you cannot use the portal built-in packages inside omni portlets. Omni portlets is designed to connect to other data source (not only oracle) and Portal API might not be available at these data sources. Therefore, you should not be using these Packages at all!. i tried very hard, but to no avail.. Omni portlet has its own repository!! if you cannot pass the infomration as a parameter, then find a different approach
    Ammar Sajdi
    Amman - Jordan
    oracle consultant

  • Omni portlet - javascript - date field problem

    I want to manipulate a database date type field with javascript in omniportlet layout.
    In the source tab of omniportlet I use the SQL: (it's very simple for example)
    select id, to_char(enddate, 'DD/MM/YYYY HH24:MI') edate, enddate
    from tlh.auctionsession
    where id = 1
    In the layout tab (HTML form). I write this javascript code in Repeating Section: (it's very simple for example)
    <script type="text/javascript">
    document.write(##EDATE##);
    </script>
    It's not woking. Anytime I use the ##EDATE## or ##ENDDATE## in my javascript code, It's not working.
    If I put ##EDATE## of ##ENDDATE## in the HTML's body, it's display well.
    I am really mad with it.
    Do you have any idea? Please help me with it. Thank you very much.
    Sorry for my bad English.

    // custom vaildation scirpt for entered date being today or a future date;
    // date format for the field;
    var cDateFormat = "mm/dd/yyyy";
    // convert the entered value to a date objecta;
    var oEntered = util.scand(cDateFormat, event.value);
    // strip down to just the year, month and day
    oEntered.setFullYear(oEntered.getFullYear(), oEntered.getMonth(), oEntered.getDate());
    // convert todays date to a date object;
    oToday = util.scand(cDateFormat, util.printd(cDateFormat, new Date()));
    // strip down to just the year, month and day
    oToday.setFullYear(oToday.getFullYear(), oToday.getMonth(), oToday.getDate());
    // compare the date values
    if(oEntered.getTime() < oToday.getTime()) {
    // error message date before today's date
    app.alert("Date must be today's date or a futuer date!", 1, 0);
    // set return code to error status;
    event.rc = false;
    // validation is assumed to be true unless the event return code value is false;
    // end custom validation script;

  • Omni Portlet shows No Listener

    We have Portal 10.1.4. When connection to portal are reached at 120 then omni portlet on every page of portal shows "No Listener". Other content still visisble on the pages, only problem with the omni portlets.
    What should i do to solve the issue.
    Thanks in advance

    Solutions is to increase timeout value in provider.xml file in MID_TIER_ORACLE_HOME/j2ee/OC4J_Portal/applications/portalTools/omniPortlet/WEB-INF/providers/omniPortlet. If you change the timeout value, you also need to do the following:
    Bounce your middle-tier.
    Increase the provider registration Timeout value of the OracleAS Portal instances with which this provider is registered.

  • Accessing Organizational Unit info of Portal User

    Hi Experts,
    Using UME API I can access almost all data of a portal user, but I couldn't find how to access the "Organizational Unit" data of a user. This information is under the "Additional Information" TAB for NW04s.
    If anyone faced this issue, plase let me know how to do that.
    regards

    HUSEYIN,
    Most probably it's accessible only via generic UME IPrincipal API:
    userObj.getAttribute(namespace, attrName);
    To find out all possible namespaces/attributes use the following:
    final StringBuffer result = new StringBuffer();
    final String[] namespaces = userObj.getAttributeNamespaces();
    for (int i = 0, c = namespaces.length; i < c; i++) {
      final String ns = namespaces<i>;
      final String[] attributes = userObj.getAttributeNames(ns);
      for (int j = 0; k = attributes.length; j < k; j++)
        result.append(ns).append(':').append(attributes[j]).append('n');
    Then analyze output of result.toString() and try to find out what attribute represents OU.
    Valery Silaev
    SaM Solutions
    http://www.sam-solutions.net

  • Synchronize portal users with R/3 automatically

    I am trying to find out more about how the portal will automatically create an user and assign it its relavent roles once the user has been created in R/3. I understand this is possible with ECC6? i have searched but cant seem to find what i am looking for.
    Any links/advice with be much appreciated.

    Hi,
    You can use the ABAP server as the data store for portal users. So all the user ids, roles & groups in the ERP system is available in portal.
    Please check the following link & sublinks for detail info.
    http://help.sap.com/saphelp_nw70/helpdata/en/49/9dd53f779c4e21e10000000a1550b0/frameset.htm
    Regards,
    Abhishek

  • How to Change Date Format according to the Locale/Country of Portal User

    Hi,
    In a webdynpro applicaiton, how to chage the  Date Format according to the Locale/Country of Portal User.
    Consider for INDIA: mm/dd/yyyy
    Consider for UK: yyyy/mm/dd
    So when i select the date from the Date Picker[input ui element bound to date context variable], the date format should be displayed accroding the portal users country/locale.
    Creating a simple type for every date format in the dictionary would not be the right solution.
    Please help.
    Thanks,
    Regards,
    Aditya Metukul

    Hi Aditya,
    Check out the following post in SDN and refer the
    Bertram's reply on the same topic.
    date format
    Regards,
    Shubham

  • Caching data in Omni Portlets

    If i insert new data into my database it takes a while before my omni portlet picks it up(even if i refresh the portlet), i have turned off page level caching, but this doesnt seem to solve the problem - is there any way to fix this?
    Also occasionaly my portlet errors with : "Error in executing Query : [Io exception: Connection reset by peer: socket write error]" but the database is still up. Any ideas?
    Thanks

    The answer depends. You have to ask and answer these questions...
    how much data needs to be cached per session
    must the session data remain in existence after the session is closes
    what are your response time requirements
    what are the maximum number of users that you will need to support
    Some options are
    - Statefull session beans
    - Cookies
    - Stuff the data into the http session object
    - Caching session information in a singleton (more complicated in a cluster)
    All of these options are good ones. Apply the write one to your specific
    instance.
    Good luck
    "Sandhya S Suku" <[email protected]> wrote in message
    news:[email protected]..
    Hi,
    Is it a good idea to cache user dependent data in stateful session
    beans because of repeated hits to the same data?
    Is there a better way to do this?
    Thanks
    Sandhya

  • Real brain bender: virtual host or omni portlet issue? Take the challenge

    We are having problems with a portal page that displays several omni portlets on several tabs. Here's the situation:
    The page consists of 5 tabs, each representing a different demographic characteristic. On each tab there are four omni portlets. One omni porlet represents a selection list. The user makes a selection, which triggers an omni portlet event to pass the selection criteria to a page parameter. The other three omni portlets on the tab read the parameter value and retrieve data according to the selected parameter value.
    Example: The user selects the Age tab and selects the link representing data for the Central Region. The omni portlet's event populates the page's "region" parameter with the value "Central." The other three portlets on the tab retrieve their respective data where region = 'Central'.
    Since all the tabs on the page represent different demographic characteristics, the omni portlets on all the other tabs also perform their queries where region='Central' so that the user will see Central Region data displayed regardless of what tab they navigate to.
    Also, when the user navigates to another tab and selects a different region, all the omni portlets on all the tabs perform their respective queries to capture data where region=<selected region>.
    The page performs correctly until we configure a virtual host. In that case, when a user makes a selection of a particular county in one tab, the queries are performed but the page displays with a tab in view other than the one where the user made the selection.
    Example: the user navigates to the Age tab and selects region='Central'. Then the user navigates to Gender tab and then Living Situation tab, viewing the results on each tab. Now the user returns to Gender tab and selects region='Western.' The portlets perform their queries and the page re-displays with the user on Living Situations tab, rather than Gender tab where the selection was made.
    Obviously, we want the user to stay put on the tab in which they make their selection. I think it's a problem with the virtual host configuration. My DBA thinks it's a problem with the way the page is built. Has anyone else run into this kind of thing? Is there a trick to using Virtual Hosts?

    Your main.cf seems redundant.
    For example:
    if you specify:
    virtual_alias_maps = hash:/etc/postfix/virtual_alias, mysql:/etc/postfix/mysql_virtual_forwards.cf
    you don't need this:
    alias_maps = hash:/etc/postfix/aliases
    and i think you have a lot of more options you don't need.
    This is my main.cf on my vps and everything works great (sending and receiving emails from/to most common mail server: gmail, hotmail etc etc)
    smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
    biff = no
    # appending .domain is the MUA's job.
    append_dot_mydomain = no
    readme_directory = no
    # TLS parameters
    smtpd_tls_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem
    smtpd_tls_key_file=/etc/ssl/private/ssl-cert-snakeoil.key
    smtpd_use_tls=yes
    smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
    smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
    message_size_limit = 4194304
    virtual_mailbox_domains = mysql:/etc/postfix/mysql-virtual-mailbox-domains.cf
    virtual_mailbox_maps = mysql:/etc/postfix/mysql-virtual-mailbox-maps.cf
    virtual_alias_maps = mysql:/etc/postfix/mysql-virtual-alias-maps.cf
    virtual_transport = dovecot
    dovecot_destination_recipient_limit = 1
    it is very simple (no dkim, no forced tls, no mailbox limits and so on) and it can be improved but it works..
    as I suggested you just try spending some hour wiping postfix installation and giving a look to this guide

  • Publish a BI Publisher HTML output to the Oracle Portal

    We currently use multiple JSPs to assemble and display employee data in portlets in our Oracle Portal. We're interested in redoing the display of this data using BI Publisher and would still like to send it to a portlet in our Oracle Portal. Essentially we would pass the userid as a parameter to BI Publisher when the employee logs on to the portlet. I was wondering if anyone ever published the HTML formatted output to an Oracle Portal?

    Hi,
    I am facing the same problem. Any updates on this issue.
    Thanks

  • J2EE Connector Architecture(Omni Portlet)

    Hello,
    In the Developer Guide ,(http://download-west.oracle.com/docs/cd/B14099_10/portal.1012/b14134/pdg_matrix.htm#CEGFBJEC)
    it is mentioned about J2EE Connector Architecture as a data source. In the omni portlet data source type it is not listed. How can I configure and use it for data source?
    I am using 9.0.4 version of Portal
    Any help is highly appreciable.
    Thanks

    We are trying to do a JCA Adapter and are running into the same type of questions as you. Clearly, no one is watching this topic. Have you found a reference application to test the RA against?
    Please feel free to contact me at [email protected]

  • Omni portlet

    I have created an omniportlet that connects to a database, and retrives some values into a defined HTML layout.
    Now I'm curious. I have many user of the portal, and they each should see diferent data. I have only one Database user to work with, but can I create a where clause and include the logged in portal username, and limit the output data, based on this?
    Thanks,
    Andras Eliassen

    We have the same problem.
    When we want to use portal.wwctx_api.get_user inside of omn,i portlet select statement fallowing error occurs.
    Error in executing Query : [ORA-06510: PL/SQL: unhandled user-defined exception ORA-06512: at "PORTAL.WWCTX_SSO", line 1803 ORA-06510: PL/SQL: unhandled user-defined exception ORA-06512: at "PORTAL.WWCTX_SSO", line 1637 ORA-06502: PL/SQL: numeric or value error ORA-06512: at "PORTAL.WWCTX_SSO", line 1865 ORA-06512: at "PORTAL.WWCTX_API", line 183 ]

  • Omni Portlet Causes DB to Crash

    I'm using omni portlet SQL to retieve data from my oracle 10g database. After running the portal page which contains the omni portlets( page contain 4 portlets) the database crashes, and the only way to recover is by simply restarting the database instance from windows services. Apparantly the omni portlet is not reusing the connections and leaves the DB connections opened.
    Below is the DB Connection information set to the omni portlet
    Username: <userName>
    Password: <Password>
    Connection String: localhost:1521:orcl
    Driver Name: Oracle-thin
    Select Statement:
    select name,age, salary from employees
    I have set the layout to HTML,
    Displaying the variables:
    ##name##
    ##age##
    ##salary##
    I'm running on windows 2003 server, 8GB RAM.
    Thanks,
    Hussam

    try setting PlsqlIdleSessionCleanupInterval to a lower value then the default 15 minutes in plsql.conf
    if there is frequent use of connections then set PlsqlMaxRequestsPerSession to a lower value then the default 1000, but which can degrade performance
    or increase the sessions parameter on the database side

  • Sample  PL/SQL Portlet Source Code for Oracle Portal 9ias

    Hi, I'm a newbie of Oracle Portal technology, and I have a problem:
    I would create a PL/SQL portlet that realizes the following functions:
    1) Retrieve the username of the portal user logged from WWCTX_API.GET_USER function.
    2) Insert into an oracle db table two values about two hidden fields in the HTML FORM of the portlet.
    3) Realize the insert commit through the click on the submit button on the Html form of the portlet. I would redirect by the same button to an other page url also.
    I've never developed in Portal, and may be useful if someone could post me the source code of the SHOW MODE SECTION in the PROCEDURE SHOW of a SAMPLE PL/SQL PORTLET that realizes the upper functions.
    Thanks a lot....

    Hi
    Here's the code from Helloworld_Portlet example:
    procedure show
    p_portlet_record wwpro_api_provider.portlet_runtime_record
    is
    l_portlet wwpro_api_provider.portlet_record;
    begin
    if (not is_runnable(
    p_provider_id => p_portlet_record.provider_id
    ,p_reference_path => p_portlet_record.reference_path)
    ) then
    raise wwpro_api_provider.PORTLET_SECURITY_EXCEPTION;
    end if;
    Retrieve the portlet information.
    l_portlet := get_portlet_info(
    p_provider_id => p_portlet_record.provider_id
    ,p_language => p_portlet_record.language
    if (p_portlet_record.exec_mode = wwpro_api_provider.MODE_SHOW) then
    if (p_portlet_record.has_title_region) then
    Draw the portlet header and specify what links are available
    from that header (i.e. details, customize, help, and about).
    The has_title property is set at the page region level.
    wwui_api_portlet.draw_portlet_header
    p_provider_id => p_portlet_record.provider_id
    ,p_portlet_id => p_portlet_record.portlet_id
    ,p_title => l_portlet.title
    ,p_has_details => true
    ,p_has_edit => true
    ,p_has_help => true
    ,p_has_about => true
    ,p_referencepath => p_portlet_record.reference_path
    ,p_back_url => p_portlet_record.page_url
    end if;
    Draw the portlet borders.
    The has_border property is set at the page region level.
    wwui_api_portlet.open_portlet(p_portlet_record.has_border);
    Display the content of the portlet in the show mode.
    Use the wwui_api_portlet.portlet_text() API when
    generating the content of the portlet so that the
    output uses the portlet CSS.
    htp.p(wwui_api_portlet.portlet_text(
    p_string => 'Hello World - Mode Show'
    ,p_level => 1
    if (p_portlet_record.has_border) then
    wwui_api_portlet.close_portlet;
    end if;
    elsif (p_portlet_record.exec_mode = wwpro_api_provider.MODE_SHOW_ABOUT) then
    Display the about page for the portlet.
    htp.p('Hello World - Mode Show About');
    elsif (p_portlet_record.exec_mode = wwpro_api_provider.MODE_SHOW_EDIT) then
    Display the edit page for the portlet.
    htp.p('Hello World - Mode Show Edit');
    elsif (p_portlet_record.exec_mode = wwpro_api_provider.MODE_SHOW_HELP) then
    Display the help page for the portlet.
    htp.p('Hello World - Mode Show Help');
    elsif (p_portlet_record.exec_mode = wwpro_api_provider.MODE_SHOW_EDIT_DEFAULTS) then
    Display the edit defaults page for the portlet.
    htp.p('Hello World - Mode Edit Defaults');
    elsif (p_portlet_record.exec_mode = wwpro_api_provider.MODE_SHOW_DETAILS) then
    Display the details page for the portlet.
    htp.p('Hello World - Mode Show Details');
    elsif (p_portlet_record.exec_mode = wwpro_api_provider.MODE_PREVIEW) then
    Display the preview page for the portlet.
    htp.p('Hello World - Mode Show Preview');
    end if;
    end show;
    I think you need to add this:
    You can get the values of your html-form with this command:
    v_hidden_1 varchar2(256);
    v_hidden_2 varchar2(256);
    v_hidden_1 := wwpro_api_parameters.get_value('name_of_hidden_1_in_html_form','p');
    v_hidden_2 := wwpro_api_parameters.get_value('name_of_hidden_2_in_html_form','p');
    You can get the actual URL with this command:
    v_url := p_portlet_record.page_url;
    Hope that helps.
    Regards,
    Mark

  • Maximum Fields in Omni Portlet?

    We have recently installed PDK Release 2 v9.0.2.6.2 and are busy adding Omni Portlets to our Portals. We are really pleased with the majority of functions so far but have now hit a problem.
    I seem unable to create a report that displays more than 5 columns. I have tried various different SQL statements that all return more than 5 rows, but I only seem to be able to display 5 columns.
    Any ideas?
    Thanks,
    Paul.

    To clarify this issue I have provided a step by step example of my problem below
    1)Create blank page
    2)Add new omni portlet
    3)Select database connection to IASDB or any other valid connection
    3)Define omni portlet with the following SQL:
    SELECT 'Text 1' column1,
    'Text 2' column2,
    'Text 3' column3,
    'Text 4' column4,
    'Text 5' column5,
    'Text 6' column6,
    'Text 7' column7
    FROM dual
    4)Click on finish
    5)Omni Portlet only displays columns 1-5
    6)Edit defaults of omni portlet and on click on layout tab
    7)Under the "Column Layout" heading there are only options to display and modify 5 fields and no option to display all 7 fields returned by my SQL query.
    My question is how can I display all 7 fields in the SQL that defines the omni portlet?
    Thanks,
    Paul.

Maybe you are looking for