Change the directory to a xmldatamodel

Hello

I write xml files with my application and try to define them as a source for some listviews in tabs created dynamically.

According

http://supportforums.BlackBerry.com/T5/native-development/XmlDataModel-and-QML-read-model-from-data-...

This works if you set a property, set it to QDir::homePath (). "" / thexmlfile.xml ", and then set the source of the xmldatasource to this property.

Im working on a similar approach, I'm looking for the object XMLDataModel after I created a model-qml file tab and assign to the source of this XMLDataModel QDir::homePath (). "" / thexmlfile.xml ".

But it does not work.

I do sth bad or is it something different if you set the source from a path well?

Code:

Creating xml file:

void XmlWriter::initTaskFile(int id){
    QMap innitMate;
    innitMate["id"] = 0;
    QList tasklist;
    innitMate["tasks"] = tasklist;
    bb::data::XmlDataAccess xData;
    xData.save(innitMate,"data/"+QString::number(id)+".xml");
    qDebug()<<"taskfile initiated"<

try to set the source:

void ApplicationUI::addNewProject(QString tName,QString tDesc,QString startdate,QString enddate,QString tModel,int selectedindex,QString loan,QString limit,QString colorcode){
    JsonWriter jwriter;
    int id = jwriter.add(tName,tDesc,startdate,enddate,tModel,selectedindex,loan,limit,colorcode);
    XmlWriter xWriter;
    xWriter.initTaskFile(id);
    Tab* tab = Tab::create()
                         .title(tName)
                         .description(tDesc)
                         .objectName(QString::number(id));
            QmlDocument *qml = QmlDocument::create("asset:///TaskList.qml").parent(tab);
            NavigationPane* rooot = qml->createRootObject();
            qml->setContextProperty("management", this);
            rooot->setProperty("project_id",id);
            qDebug()<findChild("page")->findChild("container")->findChild("titlebar")->findChild("title")->setText(tName);
            //rooot->findChild("page")->findChild("container")->findChild("titlebar")->setBackground(Color.fromARGB(0xff993399));
            rooot->findChild("page")->findChild("scrollview")->findChild("listview")->dataModel()->setProperty("source",QDir::homePath()+"/"+QString::number(id)+".xml");
            tab->setContent(rooot);
            root->insert(1,tab);
}

Data directory after you create the xml file:

"."
".."
"0.json"
"1.json"
"1.xml"
"adreno_cached_blob.bin"
"data"
"data.json"
"projects"
"Settings"

error:

XmlDataModel could not open the file  "/accounts/1000/appdata/com.example.ZeitManagement.testDev_tManagement520a46aa/data/1.xml"

Problem was:

XmlDataModel needs a QUrl source, not QString

Tags: BlackBerry Developers

Similar Questions

  • How can I change the directory in which the analyses are placed on my computer?

    How can I change the directory in which the analyses are placed on my computer?

    GAS - 121 wrote:

    How can I change the directory in which the analyses are placed on my computer?

    Select HP Scan.  Select Advanced settings.  Select the Destination tab.  Select the save location.

  • Why don't c:\users\attrib h 'All Users' changing the directory to all users so that it displays in the file Explorer? Same thing with %APPDATA%\microsoft\windows\sendto and ProgramData directories?

    Title asks this.

    Why don't c:\users\attrib h 'All Users' changing the directory to all users so that it displays in the file Explorer?  Same thing with %APPDATA%\microsoft\windows\sendto and ProgramData directories?

    Thank you.

    Title asks this.

    Why don't c:\users\attrib h 'All Users' changing the directory to all users so that it displays in the file Explorer?  Same thing with %APPDATA%\microsoft\windows\sendto and ProgramData directories?

    Thank you.

    Hello

    In Windows 7, the AllUsers folder is not a real file.

    It is a symbolic link that redirects to the C:\ProgramData folder.

    ProgramData is not hidden, by default.

    The correct syntax for the Attrib command would be,

    C:\>attrib h ProgramData

    You can view all files by going to the tab options\View Organize\Folder and research.

    In the section files and hidden files , place a check mark in the Show drives, folders and hidden files.

    Click Apply/OK.

    Concerning

  • When you do $APPL_TOP CDs do not change the directory

    Dear members,

    I installed oracle ebs model VM 12.2.3 with success, but what scene cd $APPL_TOP & $INST_TOP do not change the directory.

    You can help me please how to set the environment variable as I am new starter in this field.

    Thank you and best regards,

    El

    During the execution of the command make sure that there is a space between '.' and the file "APPSDEMO_ebs.env"

    Ex;

    >/u01/install/VISION/fs1/EBSapps/appl cd #-leave if this directory is same

    > . APPSDEMO_ebs.env


    However if you are faced with the question and then close and reopen the PuTTY and try with other files .env as of the above steps.

    After that if you face same question then better take help of DBA to properly configure files approx.

    Concerning

    Patrick Reddy.K













  • How to change the directory on the Archives of parameter permanently? Try with change change is again after stopping

    Hi all

    I got this setting on the backup database

    SQL > parameters shows Archives;

    VALUE OF TYPE NAME

    ------------------------------------ ----------- ------------------------------

    ARCHIVE_LAG_TARGET integer 0

    log_archive_config string dg_config = (erpdb, stdby)

    Log_archive_dest chain

    location of string Log_archive_dest_1 = 'G:\ARC', valid_for =

    (ALL_LOGFILES, ALL_ROLES)

    LOG_ARCHIVE_DEST_10 string

    Service string LOG_ARCHIVE_DEST_2 = erpdb valid LGWR ASYNC

    _for = (online_logfiles, primary_

    db_unique_name role) = erpdb

    location of string log_archive_dest_3 = "F:\ARC", valid_for =

    (STANDBY_LOGFILE, STANDBY_ROLE)

    VALUE OF TYPE NAME

    ------------------------------------ ----------- ------------------------------

    log_archive_dest_4 string

    log_archive_dest_5 string

    log_archive_dest_6 string

    log_archive_dest_7 string

    log_archive_dest_8 string

    log_archive_dest_9 string

    log_archive_dest_state_1 string ENABLE

    allow the chain of log_archive_dest_state_10

    allow the chain of LOG_ARCHIVE_DEST_STATE_2

    log_archive_dest_state_3 string ENABLE

    allow the chain of log_archive_dest_state_4

    VALUE OF TYPE NAME

    ------------------------------------ ----------- ------------------------------

    allow the chain of log_archive_dest_state_5

    allow the chain of log_archive_dest_state_6

    allow the chain of log_archive_dest_state_7

    allow the chain of log_archive_dest_state_8

    allow the chain of log_archive_dest_state_9

    log_archive_duplex_dest string

    log_archive_format string %t_%s_%r.ARC

    log_archive_local_first Boolean TRUE

    log_archive_max_processes integer 2

    log_archive_min_succeed_dest integer 1

    log_archive_start boolean FALSE

    VALUE OF TYPE NAME

    ------------------------------------ ----------- ------------------------------

    log_archive_trace integer 0

    real chain of remote_archive_enable

    standby_archive_dest string F:\ARC

    SQL >

    I use this to change the directory to F:\ARC to G:\ARC\STANDBY

    SQL > alter system set standby_archive_dest = 'G:\ARC\STANDBY' scope = both;

    Modified system.

    SQL > alter system set log_archive_dest_3 =' location = G:\ARC\STANDBY' scope = both;

    Modified system.

    SQL >

    I checked the new parameter

    SQL > parameters shows Archives;

    VALUE OF TYPE NAME

    ------------------------------------ ----------- ------------------------------

    ARCHIVE_LAG_TARGET integer 0

    log_archive_config string dg_config = (erpdb, stdby)

    Log_archive_dest chain

    location of string Log_archive_dest_1 = 'G:\ARC', valid_for =

    (ALL_LOGFILES, ALL_ROLES)

    LOG_ARCHIVE_DEST_10 string

    Service string LOG_ARCHIVE_DEST_2 = erpdb valid LGWR ASYNC

    _for = (online_logfiles, primary_

    db_unique_name role) = erpdb

    location of string log_archive_dest_3 = G:\ARC\STANDBY

    log_archive_dest_4 string

    VALUE OF TYPE NAME

    ------------------------------------ ----------- ------------------------------

    log_archive_dest_5 string

    log_archive_dest_6 string

    log_archive_dest_7 string

    log_archive_dest_8 string

    log_archive_dest_9 string

    log_archive_dest_state_1 string ENABLE

    allow the chain of log_archive_dest_state_10

    allow the chain of LOG_ARCHIVE_DEST_STATE_2

    log_archive_dest_state_3 string ENABLE

    allow the chain of log_archive_dest_state_4

    allow the chain of log_archive_dest_state_5

    VALUE OF TYPE NAME

    ------------------------------------ ----------- ------------------------------

    allow the chain of log_archive_dest_state_6

    allow the chain of log_archive_dest_state_7

    allow the chain of log_archive_dest_state_8

    allow the chain of log_archive_dest_state_9

    log_archive_duplex_dest string

    log_archive_format string %t_%s_%r.ARC

    log_archive_local_first Boolean TRUE

    log_archive_max_processes integer 2

    log_archive_min_succeed_dest integer 1

    log_archive_start boolean FALSE

    log_archive_trace integer 0

    VALUE OF TYPE NAME

    ------------------------------------ ----------- ------------------------------

    real chain of remote_archive_enable

    standby_archive_dest string G:\ARC\STANDBY

    SQL > parameters shows Archives;

    VALUE OF TYPE NAME

    ------------------------------------ ----------- ------------------------------

    ARCHIVE_LAG_TARGET integer 0

    log_archive_config string dg_config = (erpdb, stdby)

    Log_archive_dest chain

    location of string Log_archive_dest_1 = 'G:\ARC', valid_for =

    (ALL_LOGFILES, ALL_ROLES)

    LOG_ARCHIVE_DEST_10 string

    Service string LOG_ARCHIVE_DEST_2 = erpdb valid LGWR ASYNC

    _for = (online_logfiles, primary_

    db_unique_name role) = erpdb

    location of string log_archive_dest_3 = G:\ARC\STANDBY

    log_archive_dest_4 string

    VALUE OF TYPE NAME

    ------------------------------------ ----------- ------------------------------

    log_archive_dest_5 string

    log_archive_dest_6 string

    log_archive_dest_7 string

    log_archive_dest_8 string

    log_archive_dest_9 string

    log_archive_dest_state_1 string ENABLE

    allow the chain of log_archive_dest_state_10

    allow the chain of LOG_ARCHIVE_DEST_STATE_2

    log_archive_dest_state_3 string ENABLE

    allow the chain of log_archive_dest_state_4

    allow the chain of log_archive_dest_state_5

    VALUE OF TYPE NAME

    ------------------------------------ ----------- ------------------------------

    allow the chain of log_archive_dest_state_6

    allow the chain of log_archive_dest_state_7

    allow the chain of log_archive_dest_state_8

    allow the chain of log_archive_dest_state_9

    log_archive_duplex_dest string

    log_archive_format string %t_%s_%r.ARC

    log_archive_local_first Boolean TRUE

    log_archive_max_processes integer 2

    log_archive_min_succeed_dest integer 1

    log_archive_start boolean FALSE

    log_archive_trace integer 0

    VALUE OF TYPE NAME

    ------------------------------------ ----------- ------------------------------

    real chain of remote_archive_enable

    standby_archive_dest string G:\ARC\STANDBY

    SQL >

    log_archive_dest_3 has changed from F to G

    standby_archive_dest changed from F to G

    I check again with the judgment

    SQL > alter database recover managed standby database cancel;

    Database altered.

    SQL > shutdown

    ORA-01109: database is not open

    The database is dismounted.

    ORACLE instance stops.

    SQL >

    start the DB again

    SQL > startup nomount;

    ORACLE instance started.

    Total System Global Area 9663676416 bytes

    Bytes of size 2093360 fixed

    2650803920 variable size bytes

    6996099072 of database buffers bytes

    Redo buffers 14680064 bytes

    SQL > alter database base_de_donnees eve of Mount;

    Database altered.

    SQL >

    I check again the parameter

    SQL > parameters shows Archives;

    VALUE OF TYPE NAME

    ------------------------------------ ----------- ------------------------------

    ARCHIVE_LAG_TARGET integer 0

    log_archive_config string dg_config = (erpdb, stdby)

    Log_archive_dest chain

    location of string Log_archive_dest_1 = 'G:\ARC', valid_for =

    (ALL_LOGFILES, ALL_ROLES)

    LOG_ARCHIVE_DEST_10 string

    Service string LOG_ARCHIVE_DEST_2 = erpdb valid LGWR ASYNC

    _for = (online_logfiles, primary_

    db_unique_name role) = erpdb

    location of string log_archive_dest_3 = "F:\ARC", valid_for =

    (STANDBY_LOGFILE, STANDBY_ROLE)

    VALUE OF TYPE NAME

    ------------------------------------ ----------- ------------------------------

    log_archive_dest_4 string

    log_archive_dest_5 string

    log_archive_dest_6 string

    log_archive_dest_7 string

    log_archive_dest_8 string

    log_archive_dest_9 string

    log_archive_dest_state_1 string ENABLE

    allow the chain of log_archive_dest_state_10

    allow the chain of LOG_ARCHIVE_DEST_STATE_2

    log_archive_dest_state_3 string ENABLE

    allow the chain of log_archive_dest_state_4

    VALUE OF TYPE NAME

    ------------------------------------ ----------- ------------------------------

    allow the chain of log_archive_dest_state_5

    allow the chain of log_archive_dest_state_6

    allow the chain of log_archive_dest_state_7

    allow the chain of log_archive_dest_state_8

    allow the chain of log_archive_dest_state_9

    log_archive_duplex_dest string

    log_archive_format string %t_%s_%r.ARC

    log_archive_local_first Boolean TRUE

    log_archive_max_processes integer 2

    log_archive_min_succeed_dest integer 1

    log_archive_start boolean FALSE

    VALUE OF TYPE NAME

    ------------------------------------ ----------- ------------------------------

    log_archive_trace integer 0

    real chain of remote_archive_enable

    standby_archive_dest string F:\ARC

    SQL >

    log_archive_dest_3 is back in G F

    standby_archive_dest is returning f G

    How do a perm

    Thank you

    Eddy

    Hello again;

    No matter how lucky you have configured DGMGRL and mix SQL with it? Broker would cause the problem you are reporting.

    Once you start using DGMGRL must stick to it, you cannot mix.

    Best regards

    mseberg

  • How to change the directory where the files are placed in other applications to access?

    ESR running on Centos (RedHat) 5 & 6. Because of the way my system is set up, I would change where Firefox updates a file when they need to be accessed by another application (for example, a .doc file). The default is to place them in / tmp, which works for most people, but does not work in my particular installation. (Among the programs that I use to read some files are actually on another computer, but can be started automatically from the computer, I'm browsing). I need to place these files in a network directory, so that the other computer can see.

    I looked into: config, but can't find anything pointing to/tmp. I hope that it is one of these "add a new line to about: config ' things that are supposed to be (from bones), but can be changed if necessary.

    Thank you
    Ted Miller

    You probably can make only by changing the variable of environment TMPDIR = / tmp to point to this network drive.

    You can start Firefox via a script file if you want to do this for all applications.

    #!/bin/sh
    
    export TMPDIR=<path to tmp directory>
    cd <path to Firefox>
    ./firefox
    
  • change the directory to the command prompt

    I need to change the prompt from the root c: directory not c::------(directory\subdirectory

    Hello Dennis,.

    Thank you for visiting Microsoft Community and we provide a detailed description of the issue.

    According to the description, I understand that you want to change the root directory for the prompt on the system.

    Certainly, I understand your concern and will try my best to help you.

    I suggest you to refer to the steps below and check if that helps.

    1. Open the command prompt. You can access the command prompt by clicking the start menu and typing cmd into the search field. You can also access it by typing cmd in the field run, or it can be found in the system of the start menu accessories/Tools folder.
    2. When you start the command prompt, you will be located in your home directory. It is usually C:\Users\username.
    3. There are a few shortcuts to move through the command prompt. Press ENTER after each command to execute:
    • dir- This command lists all of the folders and files in the directory that you are currently running.
    • Folder of the CD- This command move to the folder that you specify. The folder must be in the directory you are currently in. For example: If you are currently in C:\Users\ username \and you type cd desktop, you will be taken to C:\Users\ username \Desktop\
    • Path of CD- This command will take you to a specific path on your computer. You need not be in the same directory as the path. You must enter the full path to make it work. For example:
    • .. CD - this command move up to a directory of your current location. For example: If you are currently in C:\Users\ username \and you enter, you will be taken to C:\Users\
    • cd\ - This command takes you to the root directory, regardless of your location. For example: If you are currently in C:\Users\ username \and you enter, you will be taken to C:\
    • DriveLetter:- This command takes you to the drive letter that you specify. The drive you specify must be active, or have a disk in it if it a DVD player. For example, if you want to drive D, you should enter the command
    • -output This command will close the command prompt, regardless of your current place of residence.

    I hope this information is useful.

    Please let us know if you need more help, we will be happy to help you.

    Thank you.

  • Where has version 9 of Jabber changed the directory property, it asks to click to call?

    Hi people,

    We just had a bit of a drama where an upgrade of Jabber with CUPS has made the Jabber Software watch the directory 'phone number' property instead of the property 'IP phone' previous.  In our directory, phone number is the long number with area code and IP phone is the four-digit short dial extension.  This has caused havoc, as well as communications costs associated with going to the PSTN to call the next office, calls telephone inter-service are displayed as the number of coming out of this office instead of the extension of the agent.  In 'settings for legacy clients' cups there is a drop down to specify which property to use, where is that past to 9.x?

    Hello

    Can you please provide the following information:

    -Version presence

    Version - CUCM

    -Version of jabber

    Please note jabber version 8.x is set up in the CCMCIP profile on the presence server (settings for legacy clients), version 9.X now seeks the jabber - config.xml file that lives on the server tftp CUCM and completely ignores the profile CCMCIP.

    I would use the link below and it can help you generate the jabber - config.xml easily for all 9 versions and has a "Business phone" field you can change to "ipPhone", then download this time finished the CUCM tftp server, restart the tftp service and Jabber clients and test.

    https://supportforums.Cisco.com/document/106926/Jabber-config-file-gener...

    Hope to help

    Aaron

  • How can I change the directory for all updates &amp; patches (from C: to D :)

    I changed the "Install" directory in preferences, but I still over 2 GB in C:\ProgramData\Adobe. All or part of this is adjustable to D:\ProgramData\Adobe, for example? (I have only about 2 GB free on my C: drive.)

    some adobe files should go on your c drive.

    to move the directories of installation on your cc (with the exception of the lr) Player, uninstall everything that is installed on your c drive, change your installation directory in your cc desktop app, then (re) install in the directory has changed.

  • API to change the directory temp XMLP in 11i

    Do we not have a api to change the XMLP temp directory in 11i?

    Instead of going to-->

    Responsibility) XML Publisher administrator > Administration > Configuration > properties > general > temporary directory

    I do not think that there is an API, but you can update it from the backend - how all EBS XML Publisher temporary directory Via SQL? (Doc ID 1189723.1)

    Thank you

    Hussein

  • Change the Directory Structure created in the MPZIP file

    I'm trying to normalize my projects of Multisim for inclusion in our documentation control system. As I build my project, I have a directory structure that I use. When I include the files in the project, the directory structure is known in the MPZIP file. However, the default value is decompress all the files in the external folder (name of the project). Suite to help,

    Hi Doug,.

    When you unpack the project, the default is to create a new folder and put it all together because it is unlikely that the new computer will have the same file structure as the computer on which this project of.  If you want Multisim to create the same structure as the original file, you can click in the cell under "excerpt from path" and select the old path, if the folder does not exist, Multisim will create a.  Unfortunately, you will need to do this for each item on the table.

  • How to change the directory of apex - listener.xml using container startup options?

    The option proposed in the thread Re: change the URL of earphone APEX (second post by Udo) seems attractive, but being not not Glassfish pro, I do not know how.
    Anyone can indicate in which succession of menus Glassfish should I go to refer - Dconfig_dir =... parameter?

    I run Apex listener on Glassfish 3.1 1.1

    Igor

    Hello Igor.

    the setting -Dconfig_dir = is an option for the JVM, used similar to a shell environment setting.
    You can set this parameter to GlassFish by editing the startserv.bat or shell startserv script, depending on the OS you are using.
    Note that you can use any name, as config_rep is a name arbitrarily chosen for the parameter that I presented for the config file.

    -Udo

  • How to change the directory in the subfolder named '%AppData%' in the command line?

    I get this question when I wrote a .bat file.

    Operating system: Windows 7 x 64

    Create a folder on the D partition named '%AppData%', I can open this folder in Explorer without any problem.
     
    the question is how can I change in this folder in command line.

    CD /d "D:\%APPDATA%", but it does not work.

    I will appreciate for any help.

    You must use the escape character ^ warns we %APPDATA%\microsoft\windows\sendto is interpreted as an environment variable:

    CD /d "D:\^%APPDATA^%".

  • Change the directory list "scan to" in the HP Director on iMac (Mavericks)

    I have an HP CM1312 MFP running on an iMac with the Mavericks.

    When you install the HP Director, at some point, the software takes over and says "installation with default settings" or similar, and then it's over.

    The resulting, program prints and scans correctly. However, I want to set up a destination for scanning to file option.

    When using the scan to file option there is no option to add destinations - there is a very limited choice (of memory just Documents and desktop).

    I have a folder called "scans" on my desktop and would like to add this destination in the drop-down list box "Scan to file."

    Is this possible and if so, how?

    Thanks in advance

    Hello bilfen,.

    Welcome to the Forums of HP Support!

    To get your question more exposure I suggest you post in the trade forums since it is a commercial product. You can do it at Business Forum.

    Concerning

  • How can I change the target directory for NOR-DAQ 6.9.3?

    I try to install NOR-DAQ 6.9.3 on a new laptop computer.  I tried to change the target directory, but the installer does not allow me to change it.  Is it possible to change the directory?

    When you say that the installation program does not let you change the directory target, you receive an error?  In my view, is it possible to change the target directory by selecting the feature in the feature tree, then by manually changing the target directory to the bottom of the installer.  When this is done, a pop up will occur who says a new folder will be created to save the files to.

Maybe you are looking for