Apex 3.2 hook javascripts to IR and execute those when report is refreshed
Hi,
You propably have see tricks to attache javascript to IR refresh using time out and gReport.l_LastFunction e.g. these.
http://roelhartman.blogspot.com/2010/04/alternative-to-alternating-row-colors.html
http://www.talkapex.com/2009/03/column-groups-in-apex-interactive.html
Here is alternative solution:
You need load jQuery 1.4.2 e.g. in page template header
Create page zero if your application do not have one. Then create HTML region before footer with no template.
Place code to region source
<script type="text/javascript">
;(function($){
$.htmldbIrBusyGrap=$.fn.htmldbIrBusyGrap=function(){
/* for bind IR ajax */
/* check do we have IR on page */
if($('#apexir_WORKSHEET_REGION').length>0){
/* replace apex internal function _BusyGraphic */
gReport._BusyGraphic=function(pState){
if(pState==1){
/* ir ajax start trigger htmldbIrAjaxStart event and show loading icon */
$.event.trigger('htmldbIrAjaxStart');
$('#apexir_LOADER').show();
}else{
/* check is there data stored to #apexir_WORKSHEET */
if(!$('#apexir_WORKSHEET').data('htmldb')){
/* store data to #apexir_WORKSHEET */
$('#apexir_WORKSHEET').data('htmldb',{irReady:true});
/* trigger htmldbIrReady event */
$.event.trigger('htmldbIrReady');
/* hide loading icon and trigger htmldbIrAjaxEnd*/
$('#apexir_LOADER').hide();
$.event.trigger('htmldbIrAjaxEnd');
return;
$.event.trigger('htmldbIrReady');
$.htmldbIrReady=$.fn.htmldbIrReady=function(fn){
$(function(){
if($.isFunction(fn)&&$('#apexir_WORKSHEET_REGION').length>0){
$('#apexir_WORKSHEET_REGION').bind('htmldbIrReady',fn);
})(jQuery);
addLoadEvent(function(){$.htmldbIrBusyGrap();});
</script>Now your IR will trigger htmldbIrReady event when report is refreshed.
Usage example
<script>
$(function(){$('#foo').bind('htmldbIrReady',function(){alert('Hello');});});
</script>Also it trigger htmldbIrAjaxStart and htmldbIrAjaxEnd events.
Usage example
<script>
$(function(){$('#foo').bind('htmldbIrAjaxStart',function(){alert('Ajax start');});});
$(function(){$('#foo').bind('htmldbIrAjaxEnd',function(){alert('Ajax end');});});
</script>Or use function $.htmldbIrReady example
<script>
$(function(){$.htmldbIrReady(function(){alert('Hello');});});
</script>Small demo that logs those events here
http://actionet.homelinux.net/htmldb/f?p=100:87
Hope this helps and you post other innovative solutions or usage examples about this
Regards,
Jari
Jari,
i have found my bug which prevented the Page from working.
i have a custom build apex_loader
<script src="#WORKSPACE_IMAGES#jquery-1.4.2.min.js" type="text/javascript"></script>
<script src="#APP_IMAGES#jquery.simplemodal-1.3.5.js" type="text/javascript"></script>
<script type="text/javascript">
* @param pRegionStaticId ID of region to set to modal
* @param pOptions Options for modal Screen. See: http://www.ericmmartin.com/projects/simplemodal/#options for more info
goModal=function(pRegionStaticId, pOptions){
var vDefaults = {persist: true, overlayCss: {backgroundColor: '#606060'}}; // Note: It's important that you leave the persist = true otherwise items values will be cleared
pOptions = jQuery.extend(true,vDefaults, pOptions);
// To maintain order of APEX items (see forum posting above)
$('#' + pRegionStaticId).wrap('<div></div>');
// toon het ajax laad scherm
html_ShowElement('AjaxLoading');
// Laat de region zien, in dit geval 'apexir_LOADER' --> het icoontje bovenin
// $('#' + pRegionStaticId).show();
// Open het modal scherm
// $('#' + pRegionStaticId).modal(pOptions);
}// goModal
* Sluiten van het modal scherm
modalClose=function(){
// verberg het ajax laad scherm
html_HideElement('AjaxLoading');
$.modal.close();
}// modalClose
// OnLoad tasks
$(document).ready(function(){
// Voor alleen uit wanneer er een IR is op de pagina
if ($('.apexir_WORKSHEET_DATA').length > 0) {
// See apex_ns_3_1.js for _BusyGraphic
function dispIRBusyGraphics(pState){
if(pState == 1){
// Here apexir_LOADER is the object ID.
// You can use your own region if you wanted to etc...
goModal('apexir_LOADER', {position:['30%',]});
else{
modalClose();
return;
}// dispIRBusyGraphics
function updateIRJS(){
// This time out is required since after the report is refreshed
// via AJAX, need to reattach the l_LastFunction command
setTimeout(
function(){
gReport._BusyGraphic = function(pState){dispIRBusyGraphics(pState);};
1000
gReport = new apex.worksheet.ws('');
gReport.l_LastFunction = function(){dispIRColGroups();}
// Need to put timeout since not registering on initialization
setTimeout(function(){gReport._BusyGraphic = function(pState){dispIRBusyGraphics(pState);};},500);
updateIRJS();
} //If IR exist
</script>and when i disabled this on page 0 the functionality was working correctly.
Thanks for demoing this in the application.
Marco
Similar Messages
-
One email account on ipad2 works other account won't show content then will only load 6 emails out of 400. I deleted email account, did all updates, reboot, still saying "loading" constantly . First shows 6 then jumps up to 52 then back down to 4 in the inbox, what a mess, payroll day for staff I need email. Applemess! I paid for extra warranty but no help from them
Well, eating crow is not one of my favorite meals...even though I did not change my email settings;end result is it had something to do with"pop" server item. I phd apple,the 2nd call resulted in this suggestion and i looked on you tube and got a tutorial. So, don't pay to get apple help, it is not hardware issue or their software. As rbrylawski said..at the start(heavy sigh) it is prob a server problem. Words of wisdom, when u get really frustrated like I was day after day no email, wait until you get the solution before putting blame onto product,company. This is what I should have done
"Thanks for trying to help me rbrylawski, can u tell me more about fixing server?" you had it right, many thanks for your expertise and.....patience. Now I hope to change my name on this site. -
How to Create a Page LOV Template and a Region LOV Report Template in APEX
Hi All,
Thanks in advance ..
I am new to APEX , Currently working in APEX 3.2
Can any one please guide me How to Create a Page LOV Template and a Region LOV Report Template in APEX
So that I can create dynamic Multi column LOV in APEX
Cheers
SachinSachin,
I think you are en-quiring about 'Custom pop-up page'. See this link. You will get all required info there.
Regards,
Hari -
HP Pavilion dv6700 CTO Notebook PC and I hook to HDMI cable and connect to tv and get no sound
i have a HP Pavilion dv6700 CTO Entertainment Notebook PC and I hook to HDMI cable and connect to tv and get no sound when attached to tv. I attach the cable get the video but no sound. I check sound and do not see anything other than the altec lansing speckers and realtek. Th altec lansings are the default. Help
Hello gman0700.
Welcome to the HP Forums. I understand you are unable to produce audio through an HDMI connection. I apologize for the late response, but I will do my best to assist you. Before anything else, please answer these questions:
1. What is the current computer's operating system? Does the same behaviour occur on multiple operating systems?
2. The title seems to imply that there is no audio when connected to a television, using HDMI. Does this only occur when you connect to a television? Will it occur if you connect to something else using HDMI?
3. Have you tried connecting to a television using VGA or DVI? If so, what are the results?
As an additional suggestion, for now, I would review the television's manual to confirm that everything is correct from the television's standpoint.
Please post this information as soon as you can. Thank you posting on the HP Forums. Have a great day!
Mario
I worked on behalf of HP. -
I bought a Samsung 51" Plasma
PN51F5300AFXZA
Here's the Best Buy.com page for it: http://www.bestbuy.com/site/samsung-51-class-50-3-4-diag--plasma-1080p-hdtv-black/8239047.p?id=12188...
Scroll down to "See (4) Special Offers" and then click "Free Delivery, Haul Away & Recycling"
Here's what it reads, of which I got none:
Free Delivery on TV Purchases 51" or Larger
Best Buy will provide Standard Local Delivery of your TV. Charges apply for delivery outside local delivery area. TV will be delivered into the room of your choice and unpacked. Best Buy will assemble your TV, place it on an existing TV stand, and connect your TV to a single, existing source (satellite box, cable box or antenna) within the room. Delivery and installation may require two appointments.
Excludes prior purchases and Best Buy Marketplace items. Not valid with other offers. Subject to availability of products and delivery capacity.
Television Haul Away and Recycling
We will haul away a television from your home for free when a qualifying replacement product is delivered by Geek Squad® or Best Buy Home Delivery. Then we will make sure it is properly and safely recycled. Additional TVs can be removed and recycled at a cost of $20 per unit.
The units are responsibly recycled by our licensed, third-party recycling partners. The recyclers ensure that the various commodities are sent to end markets to be recycled and repurposed into new products. For more information, see BestBuy.com/recycling.
>> To once again reiterate, they did not unbox my TV. They did assemble my TV. They did not hook it up.
And they did not haul away the old TV.
And now I can't find anyone at the Best Buy hotline to even understand what I'm trying to say.
HELP!Good afternoon FranklinAvenue,
After receiving your TV, I'm sure you were disappointed to find services normally included were not completed. I imagine this certainly lowered your satisfaction with your TV ordering and delivery experience.
With most deliveries, you are correct that basic setup and haul away of the old unit are typically included. With the information you registered with the forum, I was able to locate your order and review your services. Unfortunately, it seems that haul away was not included on the service order. This may have been due to it not being selected when placing the order, or a system error. However, the basic setup should have been completed. I apologize for any inconvenience this may have caused you.
I also see that you were able to have setup and haul away completed on 1/5/15. I'm glad to see that we were able to return to complete these desired services. I hope that this experience has not negatively influenced your future shopping destination.
Sincerely,
Tasha|Social Media Specialist | Best Buy® Corporate
Private Message -
APEX 3.1.2 javaScript:doSubmit don't able navigate BUG
Hi everybody,
We're working with APEX 3.1.2.
We're not able to navigate from page to page with the Thumbnails.
It seems that the javaScript:doSubmit doesn't execute.
In our example we want to go from 'Généralités' page to 'Paramètres' page:
javaScript:doSubmit('T_PARAMÈTRE');
Can you help me ?
Thanks & Regards.
Eric.HI everybody,
I apologize, when I say ``Thumbnail`` it means ``Tabs``.
Anybody had never get this bug yet ?
Thanks & Regards.
Eric. -
I have cables hooked to my MacBook and HGTV, but can't get tv to display. Help!
I have cables hooked to my MacBook and HGTV, but can't get tv to display. Help!
Are you using a Mini DisplayPort or a Mini-DVI adapter on your MacBook? What input are you using on the TV, VGA, DVI, Composite, Component or HDMI?
Also it would help to know which one of the 21 different models of MacBook you have. To see which model you have go to the Apple in the upper left corner and select About This Mac, then click on More Info. When System Profiler comes up check the Model Identifier.
And the make and model of your TV. -
I'm not even sure this is a Firefox issue; on Epicurious.com there is an option to add a recipe to your recipe box. I've used it many times and it always worked, but since I upgraded to the newest Firefox I click on that link and the window at the bottom of the screen says "javascript:void(0); - and nothing happens. I'm using Windows XP pro.
javascript:void(0); in a link is usually a placeholder for an onclick action that is done by clicking the link.<br />
It is possible that the onclick JavaScript isn't compatible with Firefox 5 and needs updating.
Start Firefox in <u>[[Safe Mode]]</u> to check if one of the extensions is causing the problem (switch to the DEFAULT theme: Firefox (Tools) > Add-ons > Appearance/Themes).
*Don't make any changes on the Safe mode start window.
*https://support.mozilla.com/kb/Safe+Mode
*https://support.mozilla.com/kb/Troubleshooting+extensions+and+themes -
Call C# method from javascript in WebView and retrieve the return value
The issue I am facing is the following :
I want to call a C# method from the javascript in my WebView and get the result of this call in my javascript.
In an WPF Desktop application, it would not be an issue because a WebBrowser
(the equivalent of a webView) has a property ObjectForScripting to which we can assign a C# object containg the methods we want to call from the javascript.
In an Windows Store Application, it is slightly different because the WebView
only contains an event ScriptNotify to which we can subscribe like in the example below :
void MainPage_Loaded(object sender, RoutedEventArgs e)
this.webView.ScriptNotify += webView_ScriptNotify;
When the event ScriptNotify is raised by calling window.external.notify(parameter), the method webView_ScriptNotify is called with the parameter sent by the javascript :
function CallCSharp() {
var returnValue;
window.external.notify(parameter);
return returnValue;
private async void webView_ScriptNotify(object sender, NotifyEventArgs e)
var parameter = e.Value;
var result = DoSomerthing(parameter);
The issue is that the javascript only raise the event and doesn't wait for a return value or even for the end of the execution of webView_ScriptNotify().
A solution to this issue would be call a javascript function from the webView_ScriptNotify() to store the return value in a variable in the javascript and retrieve it after.
private async void webView_ScriptNotify(object sender, NotifyEventArgs e)
var parameter = e.Value;
var result = ReturnResult();
await this.webView.InvokeScriptAsync("CSharpCallResult", new string[] { result });
var result;
function CallCSharp() {
window.external.notify(parameter);
return result;
function CSharpCallResult(parameter){
result = parameter;
However this does not work correctly because the call to the CSharpResult function from the C# happens after the javascript has finished to execute the CallCSharp function. Indeed the
window.external.notify does not wait for the C# to finish to execute.
Do you have any solution to solve this issue ? It is quite strange that in a Window Store App it is not possible to get the return value of a call to a C# method from the javascript whereas it is not an issue in a WPF application.I am not very familiar with the completion pattern and I could not find many things about it on Google, what is the principle? Unfortunately your solution of splitting my JS function does not work in my case. In my example my CallCSharp
function is called by another function which provides the parameter and needs the return value to directly use it. This function which called
CallCSharp will always execute before an InvokeScriptAsync call a second function. Furthermore, the content of my WebView is used in a cross platforms context so actually my
CallCSharp function more look like the code below.
function CallCSharp() {
if (isAndroid()) {
//mechanism to call C# method from js in Android
//return the result of call to C# method
} else if (isWindowsStoreApp()) {
window.external.notify(parameter);
// should return the result of call to C# method
} else {
In android, the mechanism in the webView allows to return the value of the call to a C# method, in a WPF application also. But I can't figure why for a Windows Store App we don't have this possibility. -
Javascript alert recording and testing
I have a form on one of my recorded pages, if data in a particular field matches a certain combination of letters and numbers, a javascript alert is displayed after clicking on the submit button. However if the field is correct then the form will submit and execute the next page.
Is there any way that I can check to find out if the dialog box has appeared and if it has go to a page later on in the script?
Thanks in advanceIf I understand that right, if that alert pops up, the error has occurred, and the script won't continue because of the navigation failure. When the script fails, no other "next" page could possibly appear, so there is no point to save that information for later. Correct me if I am wrong.
-
Hooking up a PC and Macbook to 1 firewire harddisc
I still got an old pc for some stuff for school and audio. I would like to be able to hook both my macbook and my pc up to 1 firewireharddisc to easily exchange files. Is such a thing possible? what equipment do i use?
Here is a link that will help you understand better:
http://www.thexlab.com/faqs/sharefwdrive.html
In general you must have firewire card as well in your old pc and the external drive must be formatted to ms-dos partition using os x disk utility, since XP now only offer to format using NTFS, and NTGFS is readd only for Mac.
Good Luck. -
i disabled my iphone by putting wrong passcode and now im locked out. ive tried holding home button while hooking up to itunes and also tried with gecko. what else is there
-Plug your iDevice into iTunes (preferably the latest version)
-Hold your Lock button for 3 seconds
-Then without letting go with Lock button, hold Home button for 10 seconds
-While holding Home+Lock button, release lock button
-Continue holding Home button for another ~25 seconds
3 seconds lock button
10 seconds lock+home button
~25 seconds home button
You can also watch a video on YouTube how to do it, search "How to put your device into DFU mode"
iTunes then would recognize the device as in recovery mode, you can then restore your device
Hope this helps! -
iPhone says "cannot connect to iTunes" I am hooked up to wifi and I keep getting this error... Any ideas?
Hi ...
Try this support article > Can't connect to the iTunes Store -
HT4306 why can't i hook up to store and download music in canada
why can't i hook up to store and download music in canada
Close your iTunes,
Go to command Prompt -
(Win 7/Vista) - START>PROGRAMS>ACCESSORIES, right mouse click "Command Prompt", choose "Run as Administrator".
(Win XP SP2 n above) - START>PROGRAMS>ACCESSORIES>Command Prompt
In the "Command Prompt" screen, type in
netsh winsock reset
Hit "ENTER" key
Restart your computer.
If you do get a prompt after restart windows to remap LSP, just click NO.
Now launch your iTunes and see if it is working now.
If you are still having these type of problems after trying the winsock reset, refer to this article to identify which software in your system is inserting LSP:
Apple software on Windows: May see performance issues and blank iTunes Store
http://support.apple.com/kb/TS4123?viewlocale=en_US -
Apex PPR built-in Javascript Functions
Can someone please explain the differences between the following apex built-in js functions as used with ppr reports.
If possible please specify the parameters they take.
1. $a_report();
2. init_htmlPPRReport();
3. html_PPR_Report_Page();
I have a requirement to show different child ppr reports based on the values passed from a parent report. I would like to show these reports dynamically. The child reports all get their values from common page items that I've defined.
I am to do this with one child report, but I'm having difficulty with more than one child report.
I can not create an example on http://apex.oracle.com/pls/otn because the db structure it is too big.
I hope somebody understands what I'm talking about and points me in the right direction.
Cheers,
SutherlandI solved this problem.
It was because when the child reports initially loaded they returned no data because the items contained no values. Note that the items are only populated when i execute the js function from the parent report which pass the current row values of the parent report to the common page items. The common page items are used in the where clause of the child reports.
So initially the apex engine got no data from the db for the child reports. I had to change the where condition that included one of the common page items with the nvl function so that i can get something back if the item is null.
Thus it works perfectly.
Maybe you are looking for
-
Disk Utility failing to repair permissions after 10.5.7
I have upgraded to 10.5.7 and now I am unable to repair disk permissions. I have tried using disk utility and that does not work. It says it has completed after less than a second, when it says that it will take several minutes to read the permission
-
How to view all attachemt in outlook for user in my network
Hello, how to view all attachment in outlook for users in my network i am used below path: "C:\Users\ username \AppData\Local\Microsoft\Windows\Temporary Internet Files\Content.Outlook" All attachments I can not find some attachments exist on the ema
-
Changes in sentences ABAP between release R/3 4.7 to R/3 6.0.
Hi, I would like to know what happen with ABAP programs when there is a version Upgrade. The case is that I want to analyze the upgrade from R/3 4.7 to R/3 6.0. , what kind of activities would I made to prevent or to try errors in programs after the
-
TS1398 why is my ipad trying to connect to 3g network?
ipad picking up 3g network instead of wi-fi
-
Dealing with number range gaps with grouping?
What i am trying to do is get a query of data that gives me a start year and end year. I can't use min and max as there could be gaps in the year.. 1999,2000,2002 i am missing 2001 .. so i need 1999/2000 and 2002/2002 here is a bigger example. Table