I want to refresh data automatically in interactive grid ,reflow report. I tried this method it worked for classic and interactive report:
I wrote static I’d for classic “ATTENDANCE”
And static I’d for interactive report “INTER”
and write this code in JavaScript in execute when page load :
Setinterval(“jquery(“#ATTENDANCE”).trigger(‘apexrefresh’);”10000);
Setinterval(“jquery(“#INTER”).trigger(‘apexrefresh’);”10000);
Try setInterval(function () {apex.region("ATTENDANCE").refresh()}, 10000); instead of the jquery refresh
Related
Good day, fellow stackoverflow users. I have a problem using Vaadin TestBench in order to test a sub-window.
To be more specific, I've programmed a "popup" window that will be invoked by the main application when such application fails for whatever reason. As this sub-window doesn't have an URL, it will simply be invoked programmatically. I'm having problems coming up with a way of testing this single sub-window, as I have searched and read the Vaadin documentation, but all examples I see involve creating a driver for a certain browser, invoking a URL, accessing its elements and then doing the tests.
All I want is something like this:
Window popup = new Window() // Create sub-window (popup) programmatically
// instead of navigating to an URL with a web driver
// Here, I select the elements of the popup and do actions on it
// programmatically
...
// End the test and close the popup window
popup.close()
Is there a way of accomplishing this feat? I'm using the latest version of Vaadin on Springboot.
Vaadin Testbench and Selenium use the same base. You can reach the popup in the same way you do in Selenium:
driver.switchTo().activeElement();
or (if it is an alert)
driver.switchTo().alert().submit(); //submit = click OK, maybe it differs from your intention
If your "popup" is a separate browser window, you can switch by windowHandle.
driver.switchTo().window();
Hope this helps :)
I have developed a .net Control Add-in(DropBoxAddIn) and applied that control on field property of Dynamics NAV page(Drop Box). Then I have included Drop Box page in parts of another page(Customer Card).
Drop Box Page has a method SetDocReference(), and I am trying to call that method from Customer Page C/AL method as below.
CurrPage."".PAGE.SetDocReference('CUSTOMER',"No.",0);
It's showing an exception like "The control add-in on control DropBoxAddIn on page Drop box has not been instantiated. Page View - Customer card must close."
If I comment the above piece of code and run the customer card page, then it's working and the control add-in displayed on the page and their functionalities are working fine.
Please help me to get it fixed.
Because of the Life Cycle of Dynamics NAV Pages your Control Add-In is not loaded, when you call SetDocReference. I suggest you implement the ControlAddInReady Event (Adding a ControlAddInReady event to custom controls). You can store your Information in Global Variable(s) in the Page Drop Box as long as the control is not ready and if ControlAddInReady gets call transfer the information. After that SetDocReference() would work directly.
how can i access the content property of a controller within the chrome debugger.
I really try to find a way to debug my application. So far i can't find a way to do that.
Thank you
Alex
add the statement
debugger;
in the method you want to debug,
Open Google Chrome, CTRL+SHIFT+i
Hit the URL of your application, navigate to the state where you think the code would run
Google Chrome automatically stops at the debugger; statement and focuses you to the sources/scripts tab as you can see in the picture
Inside the Watch expression tab click on the "+" too evaluate code in your case it would be
this.get("content");
As long as you have this breakpoint you can switch to the console panel and execute the code in that context, whenever you are done you can either close the panel by clicking CTRL+SHIFT+I or the close button down there, you can add breakpoints manually by clicking on the line number as well , Hope this helps
For more info
I'm using Ember Extentions which is not ready yet but certainly usable.
There are 2 possibilities
Use the Ember Inspector Tool for Chrome: It is not officially released yet, but from what i have heard it seems usable. I had no time to try it myself yet, but here is an article telling you how to install and use it.
Get access to your controller in the console of your browser. And then examine it as you like. Here is the code to get access to your controller.I use it myself in my app for debugging:
// i assume that your Ember.Application is stored in the global var App
var App = Ember.Application.create({
getController : function(name){
return this.__container__.lookup("controller:" + name);
}
});
// now you can use it like this. To get the users controller (App.UsersController) just use this in the console:
App.getController("users")
I'm trying to display a webpage inside the web control, when I create the control programmatically all works perfectly, but when I create the control using the Ui Builder (XML) and then get the control and instruct it to load a url:
__pWebControl = static_cast<Web*>(GetControl(L"IDC_WEB1"));
__pWebControl->LoadUrl("http://www.google.es");
it just shows a blank page, like nothing has done.
(Note: I've tried to call form->RequestDraw() with no success either)
Thanks.
Did you try waiting about two seconds before the redraw?
I've been using Osp::Web::Controls::Web in my apps extensively to display any kind of (non-editable, formatted) text. I ended up having to wait about a second or two before refreshing the entire frame to see any content in it.
OnTimerExpired(Osp::Base::Runtime::Timer& timer)
{
m_pFrame->RequestRedraw();
delete pTimerImp;
}
the timer is set like this:
pTimerImp = new Timer;
pTimerImp->Construct(*this);
pTimerImp->Start(2000);
Redrawing without waiting has always resulted in empty Web's on both WQVGA (slower) and WVGA (faster) models under both 1.1 (WQVGA) and 1.0/1.2 (WVGA).
Have you tried doing the same trick? It may help.
Have you tried to use Reload() after LoadUrl()?
I use SDK 2.0.3 and there is a WebControl which works quite well, so if you still have this problem, try the new SDK Version.
We're using WatiN for testing our UI, but one page (which is unfortunately not under our teams control) takes forever to finish loading. Is there a way to get WatiN to click a link on the page before the page finishes rendering completely?
Here's the code we found to work:
IE browser = new IE(....);
browser.Button("SlowPageLoadingButton").ClickNoWait();
Link continueLink = browser.Link(Find.ByText("linktext"));
continueLink.WaitUntilExists();
continueLink.Click();
You should be able to leave out the call to WaitUntilExists() since WatiN does this internally when you call a method or property on an element (like the link.Click() in you rexample).
HTH,
Jeroen van Menen
Lead dev WatiN