Event handler when using partial page refresh ?

Hi
I have a calendar, which uses partial page refresh. The problem is how to make javascript wait until the calendar has loaded and then do some updates on the calendar (after the user has pressed the next button that runs apex.widget.calendar.ajax_calendar('S','next');, for example ). I thought I could add "onreadystatechange" (or onload) event handler to the calendar like this: onreadystatechange="checkState()", where the function would check the state and if ready then do the updates. This doesn't work. Could somebody please tell me why not ?
Tiina

Hi,
It seems that ajax calendar missing event apexafterrefresh.
I do not know is this "bug" or just feature.
That event would be useful to your case , if I understand correct what you looking for.
For workaround , you can over write original function by placing this to calendar region footer
<script>
apex.widget.calendar.ajax_calendar=function(p_calendar_type, p_calendar_action, p_calendar_date, p_calendar_end_date){
var l_cal_type_field = $v('p_cal_type_field_id');
var l_cal_date_field = $v('p_cal_date_field_id');
var l_cal_end_date_field = $v('p_cal_end_date_field_id');
var l_cal_id = $v('p_calendar_id');
var l_calendar_region = 'calendar' + l_cal_id;
if ( p_calendar_type != 'C' ){
  $s(l_cal_date_field,$v('p_calendar_date'));
}else{
  if ( $v(l_cal_date_field) == '' ) {
   $s(l_cal_date_field,$v('p_calendar_date'));
  if ( $v(l_cal_end_date_field) == '' ) {
   $s(l_cal_end_date_field,$v('p_calendar_end_date'));
// create and apex.ajax.widget object
var a = new apex.ajax.widget('calendar',function(){
  /* start the return function */
  if(p.readyState == 1){
   document.body.style.cursor = "wait";
  }else if(p.readyState == 2){
  }else if(p.readyState == 3){
  }else if(p.readyState == 4){
   $x(l_calendar_region).innerHTML = p.responseText ;
   $s(l_cal_date_field,$v('p_calendar_date'));
   if (p_calendar_type == 'C') $s(l_cal_end_date_field,$v('p_calendar_end_date'));
   document.body.style.cursor = "";
  /* DO HERE THINGS AFTER CALENDAR REFRESH */
  }else{return false;}
// code for next,previous and today
if (p_calendar_type == 'S'){
  p_calendar_type = $v('p_calendar_type');
}else{
  $s(l_cal_type_field,p_calendar_type);
a.ajax.addParam('p_widget_mod',p_calendar_type);
a.ajax.addParam('p_widget_action',p_calendar_action);
a.ajax.addParam('x01',l_cal_id);
var lDate = (!!p_calendar_date && p_calendar_date !== '')?p_calendar_date:$v(l_cal_date_field);
if (p_calendar_type == 'C') {
  var lendDate = (!!p_calendar_end_date && p_calendar_end_date !== '')?p_calendar_end_date:$v(l_cal_end_date_field);
a.ajax.add(l_cal_date_field,lDate);
if (p_calendar_type == 'C') a.ajax.add(l_cal_end_date_field,lendDate);
a.ajax.addParam('x02',lDate);
if (p_calendar_type == 'C') a.ajax.addParam('x05',lendDate);
a.ajax.add(l_cal_type_field,p_calendar_type);
a._get();
</script>Where I have comment *"do here things after calendar refresh"*, you can hook own scripts.
Of course this is not best way, but might help you till ajax calendar support dynamic actions fully
Regards,
Jari
Edited by: jarola on Oct 20, 2010 3:11 PM

Similar Messages

  • Partial Page Refresh - Text Box Update

    Hi,
    I have a page where there are numerous regions, each containing two or more text fields. I want these to update periodically using partial page refresh.
    I have got the partial page refresh working but my text fields are not being updated. How would I get them to update? I know I can't call a page process from javascript, only application processes.
    Cheers
    Simon

    Hi John,
    I think you'll need to create two dynamic actions. One of type PL/SQL block with null; as the source and enter the items to submit. The second is the Refresh Region Dynamic Action..
    Martin
    http://www.talkapex.com

  • Partial page refresh is not working in APEX 4.0

    Hi All,
    I have a report region in my application,I have selected the following properties for the region,
    Pagination scheme - Row ranges X To Y (with next and previous links)
    Enable partial page refresh - yes
    Display position - bottom -right
    Their is an arrow mark link(next /previous) in the right bottom corner,when i click on that ,the region is displaying the next 15 rows, but the region is not getting refresh,the scroll bars are al went off if i click the previous/next link.
    After that i refreshed the page by clicking F5 ,scroll bar is appearing now.
    In the region header and footer i have added this code,
    <div style="overflow:auto;">
    </div>for scroll bar
    Please some body help me to fix this issue..
    Thanks & Regards,
    Ramya.
    Edited by: Ramya on Apr 15, 2012 10:42 PM

    Hi All,
    I fixed this issue.
    I used Skillbuilders modal popup plugin, to open the form page as popup when i edit the record.To implement this plugin i have already created dynamic action for edit ,create and autoclose the popup.
    In the dynamic action i changed the EVENT SCOPE from BINT To LIVE and tested the application.Now its working fine.
    I can able to edit the record after i hit the next/previous pagination link .
    Thanks ,
    Ramya.

  • Oracle Apex partial page refresh problem in IE

    Hi All,
    I'm using a button to refresh a region by enabling ppr .
    On click of the button , m redirecting to url and the url target is as follows
    javascript:jQuery('#VH_SCROLL_EMP88').trigger('apexrefresh');
    Its working fine in firefox and chrome but not in internet explorer. When I click the button in IE I just get the following
    [object Object] in the page
    When I click back button of browser I'm getting the original page
    Please help me to understand and rectify this
    Regards
    Sasidharan

    a) What version of IE are you using, this probably factors greatly in this question
    b) If you want to partially page refresh a region, it looks like you're using a sledgehammer when all you need is your clicking finger
    - can you create a dynamic action for your button that applies a 'refresh' action to your selected region

  • Partial page refresh in REQUEST scope

    Hi,
    I was going through the various example of partialTrigger.
    But in I am unable to find the example in where we can use the partialTrigger with having our backing bean into request scope. means Can we do partial page refresh without keeping our backing bean into session scope?
    Can we do partial page refresh across different fragments (different jsf fragment - jsff ) with having the our backing bean in a request scope?
    Is there any way that we can achieve this?
    Please can any one provide some input or help on this?
    Thank you in advance.
    - Kumar

    Hi,
    Can we do partial page refresh without keeping our backing bean into session scope?
    Yes, don't know how you get to this idea that you couldn't. You can use ADFFacesContext.getCurrentInstance().addPartialTarget(component)
    Can we do partial page refresh across different fragments (different jsf fragment - jsff ) with having the our backing bean in a request scope?
    You are posting a JDeveloper 11 question without saying it first. Also note that there is a JDeveloper 11 forum here on OTN. To answer the question, I don't think that you can do this and that instead you would use a region and contextual events to refresh the area
    Frank

  • (Classic) Report losing pagination on partial page refresh - APEX feature request

    I have a page with both an Interactive Report and some classic Report regions.
    Based on user updates, there are many occasions where I need to do a partial page refresh.
    Thanks to plugin http://www.apex-plugin.com/oracle-apex-plugins/dynamic-action-plugin/refresh-interactive-report-1.0_361.html
    I'm able to refresh my IR, but not my classic report (unless I do a submit of the whole page) without losing pagination.
    Request: Will a Dynamic action 'Refresh without losing pagination' be part of future apex versions?
    Now, in apex 4.2, is there another work around available for classic reports?
    (I use 'submit page' now as action, but it's at least a second slower as a partial refresh, and because I need it on every user update, this second becomes a big addition to user frustration).
    Thanks, JP

    Here is the solution for your problem:
    https://apex.oracle.com/pls/apex/f?p=31517:243
    Denes Kubicek
    http://deneskubicek.blogspot.com/
    http://www.apress.com/9781430235125
    https://apex.oracle.com/pls/apex/f?p=31517:1
    http://www.amazon.de/Oracle-APEX-XE-Praxis/dp/3826655494

  • POP LOV and Branching ( Partial page refresh)

    I have a POP LOV (Shows description and returns id). I want to change certain elements on the screen based on the user selection.
    It is not possible via POP LOV. I cannot use selection lov since the number of values returned is going to be very large.
    is it possible to achieve this functionality in any way using POP LOV ?
    Appreciate your help.
    Rgds

    Scott,
    Thanks for your input. I think I didn't frame my question correctly, sorry about that. I will describe further
    I want the page to refresh after a value is chosen using POP LOV. THis is required to hide/show certain elements on the screen and also to populate another Dependant LOV.
    For example, choosing country should populate dependant "city" or states lov. I have to achieve some functionality similar to this. I do not want to "Submit" the page, because I don't want to save anything at this point in time.
    So it would be partial page refresh (Similar to OA Framework) without submit.
    Rgds,
    Venkatesh
    Message was edited by:
    Venkatesh_pr

  • Partial Page Refresh Samples

    Hi Guys,
    Where can I find some cases/page in HRMS 9.1, which leverage partial page refresh, a new features from PeopleTools 8.50?
    Thanks,

    Yes, this can be done in Ajax, now depends if you have worked on Ajax or not? You just need to intanciate XHR object, i.e. xml http request, call a custom jsp where you retrieve the values using jdbc, and update the OAF page.If you have not worked extensively on javascript using ajax features i would advice not to go via that route as you may not support it in future.
    --Mukul                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Can i use partial page rendering with BC4J?

    Hi!
    I can't use partial page rendering when i use table for bc4j...
    Why is it?
    Viktor

    Why do you say that? It seems to work fine for me...

  • I understand that when using Numbers/Pages - an up-arrow on a document means that the file is still to be uploaded to the cloud, what does a down arrow mean? It seems the document can't be accessed until the arrow clears.

    I understand that when using Numbers/Pages - an up-arrow on a document means that the file is still to be uploaded to the cloud, what does a down arrow mean? It seems the document can't be accessed until the arrow clears.

    I believe what it's supposed to mean is that some changes were made to the document on another device, and those changes were saved back to the cloud.  Now you've opened iWork on a different device to access that document - it compares the document you've got locally with the one in the could, sees some recent changes and downloads them.
    What gets me is why this sometimes happens even when I've not made any changes to a document from another device.

  • How to use Partial Page Navigation

    according to Web User Interface Developer's Guide for Oracle Application Development Framework section 7.4.1 How to Use Partial Page Navigation,
    I set 'oracle.adf.view.rich.pprNavigation.OPTIONS' to 'on' in the web.xml.
    and in the jspx, I use af:commandNavigationItem to navigation and set the tag 'partialSubmit' attribute to true.
    But it does not work. does anybody know how to use this feature?

    Hi,
    the question is "what does not work". Partial Page Navigation is there to improve performance on page navigation. So if you navigate from page1 using a navigation case to end up at page 2 then the outcome of the command action's action property should match the navigation case name.
    Frank

  • Refresh event problem, when using anything other than on-load

    I am attempting to create a series of sequential xml loads, without any user interaction.
    I.E. xml1 contains the location of xml2, and xml2 contains the location of xml3, so the next must wait until the prior xml has been loaded.
    It is impractical to use dropdown lists or refresh buttons to update these - (they should all happen behind the scenes as they are just loading selections that change depending on the user privileges).
    While my desired refresh-event is the when-value-becomes, I have tested when-value-changes, and found the same problem.
    When I set these to automatically chain through (xml1 is set to refresh-on-load, xml2 is set to load by a trigger cell that equals "load" if there are values loaded from xml1, and so on) - the conditional refresh events do not fire.
    When I use a manual refresh button, they load without a problem, and when I use a dropdown list to test the on-change or value-equals logic, this loads correctly too. So the problem is specifically during the intial load-up point, and is reproducable in any new xcelsius project I create.
    To state the problem precisely, during the initial loading phase of xcelsius, the logic behind when-value-changes and when-value-equals load events does not seem to execute - however after the initial load, they fire correctly based off user input.
    Is there any workaround or solution? If any clarification is needed, let me know where.

    May not be your exact issue, but something similar -
    Only a problem w/SP3 - I used dynamic visibility to hide two connection refresh buttons that were loading data after components finished. They stopped working until I turned the dynamic visibility off and just hid them behind other layers. Confirmed by revealing them after load and the triggers ran appropriately. May not be the issue (since you didn't mention visibility), but worth a try.

  • Dropdown box - which event handler to use ?

    I am having trouble with setting the readonly property (via Javascript) of the adjacent textbox to my dropdown box when the index value is a certain number.
    I tried using MouseUp, MouseDown, and even OnBlur....but the readonly does not seem to be getting set to true or false consistently.
    Could this be a timing issue ? The textbox that I am trying to control is the next tab-order control in the list of controls for this page.
    This same logic is working fine in the MouseUp event handler for check boxes. So I am just wondering if this is a bug or must my implementation change to accomodate dropdown boxes ? For instance, should I move the logic to the Enter event handler of the textbox instead ? Can a control's own eventhandler set itself to readonly when it is the active form field ?

    After tons and tons of testing time, I've come to the conclusion that dropdowns are totally buggy in 11.0.07 release of Acrobat Pro.
    Even if you set the "commit values immediately", you get the PRIOR selected item's value as the event value, not the CURRENT one.
    This occurs in a Validate event handler script. I have not been able to use any other event handlers for a dropdown except the OnBlur....and then, for my purposes, IT'S TOO LATE !!!
    This is totally worthless as I need to setFocus() and set fields to readonly based on the immediate dropdown offset or face value.

  • Blank page is getting displayed in SAPScript when using NEW-PAGE option.

    Hello Experts,
    We have created a customized SAPScript and in this separate Script is generated based on the currency(WAERS).
    So if we have 3 different currencies, then 3 pages will be created with there details, but we are using NEW-PAGE option in
    MAIN window to separate the pages and after 3rd page it is displaying 4th page also with footer details.
    So how can we avoid last blank page which is getting displayed?

    Hi isha.walia ,
       This issue can be solved by two ways. Please take the one which suits you better.
    Solution 1: If  you need to generate separate prints for different currencies.
    In the driver program, build an internal table for different currencies which needed to be printed. (Using delete adjacent duplicates, build the internal table with exact number of currencies to be printed). Remove the NEW-PAGE option and call the script/form inside the loop. Do the necessary conditions to manipulate the print.
    Advantages of above solution: Better control on spools if needed.
    Solution 2:  Get the count of the number of pages in a variable. Inside the print loop, increment a flag counter. Check it against the variable which contains the number of pages to be printed at the end of each page. Exit the loop when the number of pages to be printed is reached.
    Advantage of above solution: Simple to write the program.
    Thanks and Regards
    Raghesh R S

  • How can I keep pages from scrolling when using keyboard page-down

    The bottom of the pages window has a gear. You can select "Page" in the drop down menu and click the arrow, to perform a page down. The new page is positioned exactly like the previous page. But when I type fn+down-arrow or cmd+down arrow the new page view is either higher or lower than the previous page. Resizing the window makes it almost possible to get a consistent page display but not quite. It's awkward trying to read a document when each new page jumps to a new position. The arrow next to the gear is the only solution I've found.
    Does anyone know a way to achieve this page down view using just the keyboard. I'm using the iMac wireless keyboard?
    Thanks,
    Mark

    It is an annoyance, due to the 2 meaning two different things.
    The page down key means the whole window view which is not the physical page that you see in Pages.
    Apple could have clarified it by labelling the key +window down/up.+
    Peter

Maybe you are looking for