Refreshing a portlet after RegisterForEvent fires

Hello,
I have two ASP.Net/C# portlets, and I can properly get one of the portlets to "talk" to another portlet using the document.PCC.RegisterForEvent and document.PCC.RaiseEvent methods in Javascript.
But what I need to do is on the receiving portlet where I'm using document.PCC.RegisterForEvent is to capture the argument I'm passing in (I can do that) and then refresh just that portlet so I can do a database call in the code behind and show some related information from the database in the receiving portlet.
I haven't been able to find any examples of this, all the examples I've seen in the development guide seem to be just using javascript to send arguments to another portlet (Adaptive portlets) but not to refresh the receiving portlet so some C# code can be called.
Any help is greatly appreciated.
Regards,
David

Hi David,
We have succeeded in doing this. In the event handler function of the receiving portlet, we get a handle on a hidden form control. We then put the argument value that has been received into this hidden form control. Finally we trigger a postback. The hidden field is a server-side control, so now the received value is available on the server-side for you to work with.
Here's an example:
// Function that listens for EmployeeSelected PCC events and gets
// content for the portlet based on the Employee id
handleEvent<%=Session("portletID")%> = function(EmployeeId)
myTABSUpdate<%=Session("portletID")%>(EmployeeId);
// Function that handles the response and redraws
myTABSUpdate<%=Session("portletID")%> = function(EmployeeId)
// Get the container whose contents we want to refresh
var container = document.getElementById('txtEmpNo');
container.value = EmployeeId;
enablePostBack<%=Session("portletID")%>();
The embedded instances of "Session("portletID")" just allow us to ensure the javascript functions are uniquely named.
Hope this helps.
Regards,
Charles

Similar Messages

  • Adf popup reappears after refreshing the portlet..

    Hii all..
    i am working on a portal application in which i have a portlet added on a page.
    In this portlet i have a button, on click of which i am displaying a pop up programatically using following code -
    public void showPopupActionListener(ActionEvent event) {
    UIComponent source = (UIComponent) event.getSource();
    RichPopup popup = getPropertiesPopUp();
    RichPopup.PopupHints hints = new RichPopup.PopupHints();
    hints.add(RichPopup.PopupHints.HintTypes.HINT_ALIGN_ID, source)
    .add(RichPopup.PopupHints.HintTypes.HINT_LAUNCH_ID, source)
    .add(RichPopup.PopupHints.HintTypes.HINT_ALIGN,
    RichPopup.PopupHints.AlignTypes.ALIGN_AFTER_END);
    popup.show(hints);
    it works fine..but when i close the pop up and refreshes the portlet, the pop up appears on the front...
    i have tried changing the attributes for the pop up but the situation remains the same..
    Any help on this.!!
    Thank You.
    JDeveloper Version - 11.1.1.6.0.

    Thank you Yannick For replying..
    I did as you have suggested as follows -
    <af:popup id="propertiesPopUp" binding="#{EditProperties.propertiesPopUp}" autoCancel="disabled"
    eventContext="launcher" contentDelivery="immediate" childCreation="immediate"
    popupFetchListener="#{EditProperties.popupFetch}">
    but it dosen't call the method assigned to popFetchListener.
    Thanks

  • Fyi - refreshing the portlet repository programmatically

    You can refresh the portlet repository as follows:
    begin
    -- set portal context
    wwctx_api_private.set_context(
    p_user_name=>wwctx_api.get_product_schema);
    -- refresh portlet repository
    wwsbr_portlet_folder.refresh_data(
    1,wwsbr_site_db.portlet_siteid);
    end;
    null

    I'm having a problem using this code fragment from SQL*Plus. Is there additional code that I need to add before making these calls to set up a suitable environment?
    When I use this piece of code, all of my bespoke providers vanish from the portlet repository. The standard portal and demo providers remain. Pressing the Refresh button brings all my providers back again.
    I'd like to be able to use this piece of code to automoatically refresh the folder list during my product install, after using the SQL APIs to define the provider.
    Thanks,
    Nigel.

  • Refresh adaptive portlet

    I have 2 different adaptive portlets on a page. The first portlet raises a PCC event that is registered on the second portlet. I need to refresh (not postback) the second portlet when it receives the event. I have accomplished this with PTHTTPGETRequest following master-detail pattern. My issue is there doesn't seem to be a safe way to get the div id generated by the .net web controls that wraps my portlet. I have hardcoded PTPortletDIV_$$TOKEN$$ as the div id, but according to Plumtree, this id might change. Is there a better way to get this div id?
    Thanks,
    Tanner

    You say that you need to refresh the portlet - but not postback? Why not? Why can't you simply have the javascript function call __doPostback('','')? This will postback with no args so should not perform any logic on the server, just refresh.
    Jonathan

  • Continuously refreshing a tab after an interval leads to high memory consumption (400MB to 800MB in 30 seconds for 3 refreshes at 10 secs interval), why?

    Environment:
    MAC OSX 10.9.5
    Firefox 32.0.3
    Firefox keeps consuming lot of memory when you keep refreshing a tab after an interval.
    I opened a single tab in my firefox and logged into my gmail account on that. At this stage the memory consumption was about 400MB. I refreshed the page after 10 seconds and it went to 580MB. Again i refreshed after 10 seconds and this time it was 690MB. Finally, when i refreshed 3rd time after 10 seconds, it was showing as 800MB.
    Nothing was changed on the page (no new email, chat conversation, etc. nothing). Some how i feel that the firefox is not doing a good job at garbage collection. I tested this use case with lot of other applications and websites and got the similar result. Other browsers like Google chrome, safari, etc. they just work fine.
    For one on of my application with three tabs open, the firefox literally crashed after the high memory consumption (around 2GB).
    Can someone tell me if this is a known issue in firefox? and is firefox planning to fix it? Right now, is there any workaround or fix for this?

    Hi FredMcD,
    Thanks for the reply. Unfortunately, i don't see any crash reports in about:crashes. I am trying to reproduce the issue which will make browser to crash but somehow its not happening anymore but the browser gets stuck at a point. Here is what i am doing:
    - 3 tabs are open with same page of my application. The page has several panels which has charts and the javascript libraries used for this page are backbone.js, underscore.js, require.js, highcharts.js
    - The page automatically reloads after every 30 seconds
    - After the first loading of there three tabs, the memory consumption is 600MB. But after 5 minutes, the memory consumption goes to 1.6GB and stays at this rate.
    - After sometime, the page wont load completely for any of the tabs. At this stage the browser becomes very slow and i have to either hard refresh the tabs or restart the browser.

  • HT1365 How can I get my iPhone 4 to update my updates from my app store of it keeps telling me error 3150 or it tell me to refresh the page after updates and the updates are still there asking me to update them again

    How can I get my iPhone 4 to update my updates from my app store of it keeps telling me error 3150 or it tell me to refresh the page after updates and the updates are still there asking me to update them again?

    Make sure iTunes on the computer is logged into the account on the phone.
    Plug the iPhone in.
    In the popup window warning about wiping your phone, hit cancel.
    In the left pane of iTunes, the phone icon should be there.
    Right click on it, select transfer purchases.
    Note: this will only transfer music bought from iTunes. Not mp3's from amazon or ripped from CD's.

  • Refresh the screen after a long calculation

              Hi,
              I have a problem here:
              After I click a submit button, I want start a long process(running a stored procedure
              in
              database for about 20 mins) and after it is finished, screen will refresh automatically
              to reflect
              changes. I was using a thread to do the calculation but not able to refresh the
              browser after calculation is finished. Any one knows how to do it?
              Thanks.
              Kim
              

    Kim,
              It was just pseudo-code to hand you an idea of using Refresh.
              As for the piece you provided, it has some problems:
              1. It looks like you start marginServer() Every time there is a refresh
              2. It looks like you have marginServer as a field in the servlet, which
              is not correct as it's not guaranteed that the same instance will serve
              the next request. You'd better keep in HttpSession.
              HTH.
              Regards,
              Slava Imeshev
              "Kim" <[email protected]> wrote in message news:[email protected]...
              >
              > Hi Slava,
              > Thanks for helping.
              > I tried your code but got some error . Here is the code:
              > public class LongRunningTaskRefresh extends HttpServlet {
              > public void doGet(HttpServletRequest request, HttpServletResponse response)throws
              > ServletException, IOException {
              > stillRunning =true;
              > marginServer.start(); //this is the thread with long
              > process. In the end of it, it will set stillRunning to false
              >
              > response.setContentType("text/plain");
              > PrintWriter out = response.getWriter();
              > if (stillRunning) {
              > response.setHeader("Refresh", "5");
              > out.println("Your request is being processed" );
              > }
              > else {
              > rd = request.getRequestDispatcher("MarginSummary.jsp");
              > rd.forward(request,response);
              > }
              > }
              > }
              >
              > Do I do anything wrong?
              >
              > THanks again!
              >
              > Kim
              >
              

  • Refresh the table after closing the Popup iView

    Hi all,
    I have list of survey in my table. In that table i have toolbar button(DELETE) for deleting the survey. While deleting the survey it asks the confirmation. If we click Ok it delete the selected survey and close the popup also. what I want is I should refresh the table after closing the Popup.How can i achieve this?
    Help me in this regard.
    Thanks & Regards,
    Hemalatha J

    Hi Hema,
    Check this link.
    Visual Composer - You can do anything....
    In this blog, they are used 'Refresh' Button and a Hidden 'Plain text' message to solve this problem. If you are satisfy with this you can take this solution.
    Or you can try to trigger the 'Submit' action of 'Input form' once again from the 'Popup window' when the 'Delete' button is clicked.
    Hope it helps...
    Regards
    Basheer
    Edited by: Basheer on Dec 23, 2008 8:03 PM

  • How do you refresh a report after an update?

    Hi all,
    I have a Welcome Page that has several Portlets on it. One of the Portlets is a QBE report. From the report a user can click on a column record and be transported to a form, where the user can modify the record. Once the user is satisfied with the changes, the user hits the UPDATE button and is transported back to the Welcome Page. The only problem is that the Report has not been updated. Refresh does not work on the web toolbar and the only way I figured out on how to refresh the report is to go into the 'Customize' page and make some sort of change and hit O.K. After that, I am redirected back to the Welcome Page with the Report refreshed with current data. How can I refresh the report, without going into the 'Customize' Page? What code does the 'Customize' page do, to automatically refresh the report? I am using Portal 9.0.2.2.14.
    TIA,
    Dan

    Hi,
    This is due to webcache. You can solve this problem by calling the page url with an extra parameter. That way the page would get invalidated.
    Say the page url is
    http://domain/portal/page_pageid=33,32951&_dad=portaldad&_schema=portalschema
    then you should call the page like this
    http://domain/portal/page_pageid=33,32951&_dad=portaldad&_schema=portalschema&1=2
    This just adds a dummy parameter at the end and hence invalidates the cache.
    Thanks,
    Sharmila

  • How to refresh a portlet without refreshing whole page?

    hi
    I have 3 jsp portlets on a page. Now, I can write some javascript code in a jsp and refresh it after a predetermined interval of time.
    If i do this with the jsp portlet the whole page will get refreshed which is not something i want to do. i want only that jsp portlet to get refreshed.
    Is it possible?
    This actually is like having yahoo mail and hotmail both of them on the page and working with both of them simultaneously. Is it possible using portlets.
    Pl. help
    null

    Hi Little Foot,
    I think it is because I use a simple input button (created manually in the code), and you use an apex built-in submit button, so it submit the page.
    But since I posted that solution, I have found a better way, that allow me to get upload status, it is very simple :
    Create a file browse item :
    Name : P3_FILE_BROWSE
    Storage Type : Table WWV_FLOW_FILES
    Post Element Text : &lt;div id="upload_status">&lt;/div>
    Bind event on the element that will trigger the upload
    $('#your_element').click(function(){
         if ($('#P3_FILE_BROWSE').val() != '') {
              $('#wwvFlowForm').parent().append('<iframe id="upload_iframe" name="upload_iframe" style="display:none;"></iframe>');
              $('#upload_iframe').unbind('load').load(function () {
                   /* upload finished, so here you can do what you want with the uploaded file
                   $('#upload_status').html('<img alt="" src="'+IMAGES_PATH+'ajax-loader.gif" style="height:28px;width:28px;" /> file processing...');
                   //do what you want with the file
                   $('#upload_status').html('')
                   $(this).remove();
              $('#wwvFlowForm').attr('target','upload_iframe').submit().removeAttr('target');
              $('#upload_status').html('<img alt="" src="'+IMAGES_PATH+'ajax-loader.gif" style="height:28px;width:28px;" /> uploading file...');
    });It automatically create the hidden iframe, submit the form into it, tell the user upload is finished, and remove the hidden iframe.
    your_element can be a button, an image, etc...
    Hope it can helps !
    Yann.

  • Have to REFRESH the Portlet to see Result?

    Hi..
    My problem is that,
    we have to click REFRESH button/mouse right click after we did some action in the Portal.
    For example, we have to click REFRESH after we click the 'Collapse' icon in the Portlet to see the result.
    Can anybody help us on this?
    Thanks.

    This problem seems to be from the cache, if you are working on 902, then the webcache keeps the page information and renders the same page if it sees no change. I suspect that WebCache is behaving wierd so please bounce it or disable your page level caching.

  • Can not refresh snapshot changes after importing data of master site

    Hello !
    I have two database computer,one as master site,one as snapshot site.Because the error of the hard disk of master computer,I use the exporting data file to recover my database.after importing ,I found I can't refresh the refreshgroup on snapshot,who can tell me why?
    thinks in advance!
    (exp system/manager full=y inctype=complete file='/home/save/backdata/xhsdcomp.dat')
    (imp system/manager inctype=system full=Y file='/home/save/backdata/xhsdcomp.dat'
    imp system/manager inctype=restore full=Y file='/home/save/backdata/xhsdcomp.dat')
    null

    You haven't listed the errors that you're receiving when attempting to refresh your refresh group, but if your snapshots are attempting to fast refresh, I suspect it's because the creation timestamp of the snapshot log on the master site is newer than the creation timestamp of the snapshot. In this case you will need to do a complete refresh of the snapshot (or drop and recreate the snapshot) before you will be able to fash refresh it again.
    If this is not the case, please post the errors you are receiving when you attempt to refresh the refresh group.
    HTH,
    -- Anita
    Oracle Support Services
    null

  • Refresh Table Data after dialog window is closed.

    My JDeveloper version is 11.1.1.6.0
    I have a master-detail scenario where in Master records(Table Component) are displayed in top half of the splitter panel.
    Detail records are displayed in second half of the splitter control using table components placed on tab panel.
    After clicking on the LinkButton in Master record a bounded-task-flow is invoked in a separate inline dialog window (applicaitonModal).
    In the dialog window changes to the child records is done using SelecteManyShuttle Component.
    After invoking the commit action to close the modal window the child records do not refresh or the child records do not display changes immediately. Only after the page is refreshed the changes are visible.
    Kindly suggest a solution.
    Thanks
    Deven

    are you using af;dialog then you cn use dialog listener see this
    http://www.techartifact.com/blogs/2013/03/handling-ok-and-cancel-button-in-afdialog-using-popup-in-oracle-adf-by-dialogl…

  • Updatation of rows and refresh a field after it

    Hi All,
    I have a table called VHEADER in which i have a field called 'Total_amount' which is in MASTER BLOCK
    I have another table called 'VDETAILS' in which i have a field called 'amounts' ..
    now when user enters multiple amounts and in INSERT state the Total amounts can be refreshed . my problem is that when user queries the data and change the amounts in detail block I am calling a procedure to update the total amount in master table but it doesnt refreshes the total amount in the field of master block.
    If i issue :VMASTER.TOTALAMOUNT := VDETAILS.CALC_AMOUNTS (its a summary field) it says RECORD HAS BEEN MODIFIED BY SOME OTHER USER ..SO REQUREY IT TO SEE THE CHANGES....
    how I can update that master block field accordingly after UPDATE STATEMENT on PRE-UPREDATE.
    thanks

    Where is this procedure located? If it is in the database, then Forms does not know what the new total amount is. That is why it is telling you to requery the table. If you had used a program unit to update the total amount in the VHEADER master block, then this message should not appear.
    After calling the database procedure, do this:
    go_block('VHEADER');
    execute_query;

  • Refresh First page after returning from a framed pop-up window

    HI Can anyone help me on this technical problem.
    I have got one mainpage and from there i'm calling a popup with two frames (left, right). At frame right i'm populating the tableview.
    So when i submit(button) in tableview(right), the table contents has to be replicated in the first page and the popup has to be closed. So far it has be done successfully.
    The problem is when i return to the first page the page is not getting <b> refreshed automatically</b>. FYI, i'm not using mvc for performance reasons.
    So i need your help on how to refresh the first page, after control passes from popup.
    Here is the code, that calls the popup window
    winvar=window.open("organization.htm", 'main','height=450,width=650,status=yes,scrollbars=yes,toolbar=no,resizable=yes');

    Hi Craig & Raja,
    Let me tell thanks for your response. But your valuable solutions are not working for me. Please, check this code and please let me know that any thing went wrong.
    Here is the code
    My main page is progress.htm
    ============================
    <script language = "javascript">
        function openOrgTree(){      
           var winvar;
           winvar=window.open("organization.htm", '<b>Main</b>','height=450,width=650,status=yes,scrollbars=yes,toolbar=no,resizable=yes');
      </script>
    <htmlb:inputField id          = "InputOrgPlan"
                            showHelp    = "X"
                            onValueHelp = "javascript:openOrgTree()" />
          <% if application->i_desc is not initial.%>
          <htmlb:tableView id              = "tvX"
                           headerVisible   = "false"
                           design          = "alternating"
                           visibleRowCount = "3"
                           fillUpEmptyRows = "true"
                           columnWrapping  = "false"
                           onHeaderClick   = "MyEventHeaderClick"
                           onRowSelection  = "MyEventRowSelection"
                           keyColumn       = "Text"
                           table           = "<%= application->i_desc %>"
                           iterator        = "<%= iterate %>" />
          <% endif. %>
          </td></tr>
    organization.htm (is the frames container)
    =========================================
      <!-- frames -->
    <frameset  rows="110%,*">
        <frameset  cols="40%,*" >
            <frame name="left" src="tree.htm" marginwidth="0" marginheight="0" scrolling="No" frameborder="0">
            <frame name="right" src="table.htm" marginwidth="0" marginheight="0" scrolling="auto" frameborder="0">
    table.htm (right frame)
    ==========================
       function callSubmit()
         alert(parent.window.name);  
    // displays the name as "<b>Main</b>" which i gave at the time opening oraganization.htm
    //        parent.window.opener.refresh();
    // window.opener.location.href = window.opener.location.href ;
             window.opener.refresh();
             parent.close(); // to close the popup
    // all of the above are not working
       </script>
      <htmlb:page onLoad = "callSubmit()">
    <htmlb:button id            = "submitbutton"
                        onClick       = "myButtonClick"
                        onClientClick = "callSubmit()"
                        width         = "10"
                        text          = "Submit" />
    i need onClick to populate the internal table and onClientClick to refresh the opener.
    if event->id = 'submitbutton'.
          refresh application->i_desc.
          application->i_desc = i_desc.
    Regards
    Swaroop

Maybe you are looking for

  • How can I trap & display HTML syntax errors in mx:HTML at run time?

    I am loading HTML pages into an mx:HTML component in an AIR application. If the HTML contains errors, they show up in the trace window in debug mode.  I'd like to trap that information so I can tell the usere that there are errors (and what they are)

  • Very bad broadband speed for the last 4 days...

    Hi all, for the last 4 days, I am experiencing some big difficulties with my broadband connection. Half the day it is fine (morning), half the day is it terribly slow, to the point I cannot connect to any website. This affect not just my computer but

  • Final cut express 3.5 vs final cut express 4.0

    im thinking of getting FCE. but i was wondering since people say how FCE 4 cut soundtrack and some effects in livetype that FCE 3.5 is better then 4.0. is there enough FX and plug-ins for FCE 4 that makes up for it?. and is garage band better then so

  • Error Calling Oracle SP

    I'm running ColdFusion 6,1,0,63958 Enterprise. I've registered a DSN (using CFMX's Oracle driver) to an Oracle 9.2.0.4 database and I'm having problems calling a stored procedure from ColdFusion. Here's what my code looks like: <cfstoredproc procedur

  • TS1424 iTunes buying error

    When I try to buy an in-app a window pops up with "Please contact iTunes support to complete this transaction" Where do I do this please?