WebView: Content is not being updated after changing the URL

I wrote a code that updates the Blackberry main.qml WebView URL after that some process is running. QT/C++ code that updates WebView URL is given below

QmlDocument *qml = QmlDocument::create("asset:///main.qml").parent(this);
qml->setContextProperty("app",this);
AbstractPane *root = qml->createRootObject();
responseWebPage = root->findChild("responseWebPage");
responseWebPage->setUrl(QUrl(homePath + "/Appname/updatedhtml.html"));

I even tried to signals and SLOTs and yet it did not work

QmlDocument *qml = QmlDocument::create("asset:///main.qml").parent(this);
qml->setContextProperty("app",this);
AbstractPane *root = qml->createRootObject();
responseWebPage = root->findChild("responseWebPage");
responseWebPage->setUrl(QUrl(homePath + "/Appname/updatedhtml.html"));
bool response = QObject::connect(responseWebPage, SIGNAL(urlChanged(QUrl)), responseWebPage, SLOT(reload()));
Q_UNUSED(response);
Q_ASSERT(response);

WebView main.qml article is

WebView {
   id: responseWebPage
   objectName: "responseWebPage"
   accessibility.name: "responseWebPage"
   url: "local:///assets/initialcontent.html"
   onUrlChanged: {
      console.debug("URL is changed. New URL is " + responseWebPage.url);
   }
}

I am able to see the URL name updated in the newspapers printed by WebView debug console. I also checked that the file updatedhtml.html exists. (Checked through the system target file browser). Yet once the URL is set, I see no updatedhtml.html content displayed in device or Simulator. Is there any step I'm missing? Any help is greatly appreciated

Ahh, I see what you're missing today.  You have created a new Page, it adds the WebView and set its URL, but you have actually posted this page.  What kind of navigation you are trying to use here?  If you want to display a new page and allow the user to return to the previous, look here: https://developer.blackberry.com/native/documentation/ui/navigation/multiple_screens_stack.html

If you want to replace the current page with a new one, you must call setScene.  Alternatively, you can access the page currently displayed when it exists and update the WebView on it.

Whatever approach you take, I recommend this reading for an overview on how the user of Cascades interface fit: https://developer.blackberry.com/native/documentation/dev/fundamentals/index.html

Tags: BlackBerry Developers

Similar Questions

  • Windows 7 does not update after changing the BIOS battery

    I recently changed the BIOS battery for my desktop which runs on Windows 7. Even after that windows 7 is not able to update.

    Windows Update checks the updates forever!

    the action center has this message:

    and the history of the update is like that...

    I also tried the tool micrsoft 'Fix it '. It was of no use. Windows Update stopped for checking updates and gave the error: "80072f8f.

    Can someone please help to fix this error, this will also allow me to upgrade to Windows 10!

    Thank you.

    Use the following tutorial to reset Windows updates completely and check if it helps:

    Full updates to reset Windows

  • Android app fails to update after changing the cli - 6.1.0 for cli - 6.3.0

    Hello

    I recently changed the phonegap-version preference in my file config.xml of cli - 6.1.0 for cli - 6.3.0. If I install a new cool app on my camera it installs ok. If I try and upgrade from a previous version of the application that was using cli - 6.1.0 it does not install and gives the message "application not installed."

    If I change back to cli - 6.1.0 and make any other changes in then upgrades very well.

    It's on a Samsung Galaxy S6 (SM-G920F) running Android 6.0.1

    Could you let me know what is the problem?

    Maybe it has something to do with this: unable to update already published after phonegap app build

    To sum up: If you have set the android versionCode as an attribute of a widget, an '8' was added to it by gradle. When you set '1' as versionCode, it became "18". '2' became '28' etc.

    It seems that this has been corrected or amended. Now, the versionCode will not be increased of BMPS.

    To test this, add a '8' for you versionCode. (Once again: If you have set your versionCode to '1', replace '18'.) If you defined on '2', change it to "28".)

    If the update works now, it was caused by this change. If it doesn't, please provide your config.xml.

  • DPM appearing is not on DMM after changing the default password (5.2)

    I had to reset my DMP 4305 G to the default settings after the DMP redeployment to a new location.

    I have a static IP assigned to the DPM, but he wouldn't let me not get pass the login screen without changing the password.

    Once I changed the password, the DMP is no longer present on the DMM as connected, and I can't push orders to him.

    Hello

    Try this:

    Go to digital signs, settings, server settings and change the user name and password to match the new.

    Note that this will effect DMP all so be sure that you have the same login on all DMP information.

  • OfficeJet 4620 do not print black after changing the cartridge

    Changed the black cartridge would NOT print printhead black, cleaned, aligned over and over again.  Two days later, he started printing red for emails when should have been black.  Once again cleaned and aligned.  Changed the black cartridge XL multiplied by 2.  What a wate of money!   Page Test Windows printer printed in red.  Noticed that the Cyan cartridge was empty when viewing in troubleshooting.  Printer has never indicated that cyan was empty.  Changed the Cyan cartridge.  Now the Windows printer Test Page prints in black.  What is going on??

    Hi people,

    It seems that you have trouble with your ink.

    Please complete all of the steps described in the following document; Printer does not print black ink or color of ink or prints blank Pages, if the problem persists, I suggest you call the HP support by phone no matter whether in or out of warranty you may need a replacement printer.

    The number of call HP is 1-800-474-6836 for the Canada and the United States, or you can Contact HP worldwide.

    Please let me know the results of your call to HP.

  • Network on the virtual computer is not updated after changing the image or

    Hi all

    I encountered a weird problem with one of the pictures gold.

    What I did:

    1 remove Image network adapter gold

    2. addition of new network card and the new network in the annex

    3. power on the Image or

    have 4 you communicated an ipconfig/renew

    5. check that it is in fact now pulling an IP from the new network

    6. picture power off gold

    7 snapshot

    Now after you apply the new snapshot with the new network adapter to the pool and do a recomposition, still have all VM the old network attached to it.

    What Miss me?

    Thank you

    I think that what is expected - after you create a linked clone, its network settings are retained through operations of discount/redial. To view documents:

    "In the View Composer recomposing and rebalance operations, a best effort is made to ensure that the label of each card network NETWORK attached to each workstation linked clone is kept when a clone related new NICs inherits a new base image. View retains the label of network with a NETWORK card that was in place before the operation to reconstruct or rebalancing as the new base image has an available NIC configured with the same type of network switch. (A NETWORK adapter can be configured with a standard network or distributed virtual network switch switch.) »

  • Not authentic Windows after changing the hard drive

    Hi, I got a genuine version of windows 7 on my PC, but the hard drive was too small. I bought a new hard drive and copied the entire former disk including the operating system on it and only use the new disk. I have now a message saying that my copy of windows is not genuine and I need to buy a new copy. Is it possible to validate my copy without having to buy windows again? I bought the PC with windows pre-installed, this isn't a product key. If I reinstall my old drive do I find the key there and type it on the new drive? is this so where is it located? My operating system is Windows 7 Professional.

    Thank you

    Barry.

    Original title: validation of Windows 7

    Windows 7 came preinstalled on the old drive? If that were the case, use the product key on the COA sticker to reactivate Windows 7 the new disk:

    Click Start, right click on computer

    Click on properties

    Scroll down to the Windows Activation

    Click on the link 'change product key '.

    Enter the product key located on the COA sticker attached to the bottom of your laptop or in the battery compartment. Click next to activate via the Internet.

    COA certificate of authenticity:

    http://www.Microsoft.com/howtotell/content.aspx?PG=COA

    ??

    What is the certificate of authenticity for Windows?

    http://Windows.Microsoft.com/en-us/Windows7/what-is-the-Windows-certificate-of-authenticity

    or

    How to activate Windows 7 manually (activate by phone)
     
    1) click Start and in the search for box type: slui.exe 4
     
    (2) press the ENTER"" key.
     
    (3) select your "country" in the list.
     
    (4) choose the option "activate phone".
     
    (5) stay on the phone (do not select/press all options) and wait for a person to help you with the activation.
     
    (6) explain your problem clearly to the support person.
     
    http://support.Microsoft.com/kb/950929/en-us

  • How to change the url of sites in the new firefox tab page

    If we open newtab in firefox 9 tabs are visible. How to change the url address of the previously pinned tab.

    I found the solution for this problem.

    1. type Subject: config in firefox url and click Enter.

    2. an alert will be displayed when clicking on the button "I'll be careful, I promise!

    3. type browser.newtabpage.pinned in the text box and click on enter.

    4. right click and select the Edit option to change the URL.

    I want to change this URL
    [{"url": "http://localhost: 8080/Admin/login", "title": null},]

    After changing the URL in firefox
    [{"url": "http://localhost: 8080/Admin", "title": "Admin"},]

  • Why my photos are not being updated on all my devices which or login to iCloud?

    Why my photos are not being updated on my iPad if all my devices are signed in iCloud?

    On your iPad, tap settings > iCloud. Make sure the Photo is on.

    Additionally, make sure that your iPad uses the same account as your other devices iCloud to synchronize data.

  • HARD does not work after changing the disk partitions recovery media creator

    Hello world

    After installing windoows 8.1 April major upgrade (win 8.1 presents as OEM), and have shrunk C partition to create a data partition "D", "Troubleshooting" option under advanced start menu is no longer available.

    Toshiba Recovery Media Creator does not work, too (it can not find any hard disk recovery partion).
    I got in the OEM recovery partition.
    I am also able to create a recovery using the Windows tool unit.
    You have no idea about it?

    Thank you very much!

    Hello

    Sorry to hear about all this. Unfortunately, you now have a big problem. I don't understand why you didn't create support of recovery before you started to change the factory settings, including to change the structure of the partitions of HARD drive.

    Mobile offered with factory settings a structure specific partitions and recovery recorded image is saved on the partition of drive specific and marked with invisible markers. These markers are visible for preinstalled Toshiba recovery media creator tool and when you start the tool can find points of reference and has full access to specific files.

    Unfortunately, after changing the original scores structure Toshiba tool cannot find these markers more and is not able to copy files from recovery media recovery. What you need now is the original recovery disk. Using this disk, you can install original recovery image and after doing this, you will have new factory settings.

    I know it sounds stupid now but you must order the original recovery disk and it can be done on https://backupmedia.toshiba.eu/landing.aspx

    If you have any other questions you are welcome.

  • Office Jet 6500 will not print after changing the ink cartridges

    Office Jet 6500 will not print after changing the ink cartridges

    Hello

    This doesn't seem to be a problem with the printer itself and not Windows. I also suggest to contact the manufacturer. In this case, HP.

    Please see here: http://www8.hp.com/us/en/support-drivers.html

  • HP laserjet p1006: does not print after changing the toner

    I just changed the toner. The green light is on, but when something I send to the printer to print, the orange error light. Before inserting the toner, I pulled the Strip in transparent plastic attached to an orange tongue and the black cloth. I tried to reinsert the toner and turn on/off the printer again. Help please if you can. Thank you!

    Hi @cindycb,

    Welcome to the Forums of HP Support! I read your post and to see that when you try to print after changing the toner, the Attention light. I would like to help you today. If this helps you to find a solution, please click on the button "Accept as Solution" down below in this message. If you want to say thanks for my effort to help, click on the 'Thumbs Up' to give me a Kudos.

    Make sure all the orange, packaging material is to remove the toner.

    Make sure that the printer is connected directly to a wall outlet. (do not use a hub or a surge protector) This ensures that the printer is full on and can help this situation.

    Try and print a self-test on the printer hardware to see if it is a hardware or software problem.

    Open and close the cover five times quickly. It should print a page with black lines on it.

    You can find the flashing light distribution in this document and the right solutions for the reason that you are experiencing, lights blinking on HP LaserJet P1005, P1006, P1007, P1008 and P1009 Printer Series.

    You use Genuine HP Toner?

    Please let me know the result and if there is anything else I can help you. Thank you.

  • Printer problem - after changing the cartridge, I get a message that the USB cable is not connected

    As above. I checked the USB port and it is connected.

    Original title: printer problem. After changing the cartridge, I get a message that the USB cable is not connected?

    Hello

    1. you receive an error message/code when you try to print?

    2. What is the serial number and model of the printer?
     
    Follow the steps.
     
    Method 1
    Run the hardware and devices Troubleshooter
    This utility checks the common issues of interest and ensures that a new device or hardware connected to your computer has been installed correctly.
    http://Windows.Microsoft.com/en-us/Windows7/open-the-hardware-and-devices-Troubleshooter

    Also run convenience store Print that would help us diagnose the problem better
    http://Windows.Microsoft.com/en-us/Windows7/open-the-printer-Troubleshooter

    Method 2

    (a) check the physical connection of the printer and make sure that the USB cable is properly plugged.

    (b) connect the printer to a different USB port and check if it helps.

    (c) check the on another computer.

    Method 3

    Run the fix - it tool from the link.

    Diagnose and automatically fix problems printing and printer http://support.Microsoft.com/mats/printing_problems/

    Method 4
    If the previous step fails, follow the steps described in the following link:
    Printer in Windows problems
    http://Windows.Microsoft.com/en-us/Windows/help/printer-problems-in-Windows
     
     
    Let us know if it helps.

  • Local Variable is NOT being updated?

    Hi all

    Please see the attached picture for the problem that I am facing. Basically, I want to open multiple files in a folder and file names allows you to derive the other names of files in a different folder and plot the data in all the files.

    Here's what I do:

    1. use the file dialog box to select files

    2. create a local variable to 'selected files' - see below

    3. derive from new files "new files" using the "selected files" and make a local variable of the "new files".

    4 plot data of "selected files".

    5. Drawing data from the files of 'new '.

    The reason for the local variables is that I will access files original and derived from many places in my VI and I want to avoid the eternal wiring or by opening the file several times dialog box (less clicking - my figure of index hurts )

    Problem: Data from "selected files" get traced. However, given "new files" are NOT given in the 'new' files to run it, but run a previous data. Apparently, the local variable "new files" does not get UPDATES

    with the "new files" of the current run. I have to run my VI twice. Why is this? How can I solve this problem?


  • After changing the administrator password in windows server 2003, I can not connect the next day why?

    After changing the password in windows server 2003, when the new password take effect?

    Hello

    In dealing with the problem with Windows Server 2003, it would be preferable to send the same in the Technet community. http://social.technet.Microsoft.com/forums/en-us/smallbusinessserver/threads

    Hope the information is useful.

Maybe you are looking for

  • SmartTouch 520-1020: 10 Windows corrupted and tried to reinstall windows 7

    I have a SmartTouch 520-1020 which worked fine until I upgraded to Win10. No PC does not start correctly. I tried to reinstall Win 7 64-bit via the disk and the partition that has the operating system on it inadvertently allowed. I created a new Win1

  • Two pre-charge at the start of the operating system

    BONES of YosemiteTwo pre-charge at the start of the operating system: Video: https://www.YouTube.com/watch?v=D45Hl-ZgHTI Is this normal? MacBook Pro with the Retina display,OS X Yosemite (10.10.5), 15 "MJLT2LL/A

  • Ultiboard PCB outline

    Hi all, I am new to Ultiboard and try to throw a quick Board together.  I'm trying to remove the objectives of optical investment that appear in the upper left corner, bottom left and right corners of the PCB, as their size is disturbing given the bl

  • Subvi event management

    Hi all I register an event (change in value of a boolean array) in a Subvi.  I connect the refnum with connector dynamic event (event loop) the in the top-level VI.  If the loop is triggered when the Subvi Boolean change table. It works well if the S

  • Two conflicting copies of XP seem to be loaded on my computer. Possible?

    I rebooted just Windows XP (due to a hard drive crash), but now at the start, I am asked to answer this question: "which operating system I use?" There are two Windows XP Home editions to choose from. The top allows Windows to start loading as usual,