How to change rootIndexPath with javascript

I wish I could change the value of rootIndexPath with javascript. Is this possible?

I can see the value of rootIndexPath with

{Label

text: "" root path Index: "+ listview.rootIndexPath ;}"

but I can't change the value. Here's the code I'm trying to fix

example:

Button {}
text: 'run '.
onClicked: {}
listview.rootIndexPath = 1;
} //end onClicked

} //end button

{To ListView
rootIndexPath: [2]
ID: listview
dataModel: {XmlDataModel}
Source: "simplelist.xml".
} //end dataModel

} //end listview

Have you tried with:

listview.rootIndexPath=[1];

Alternatively, tou can try with:

var tmp = rootIndexPath;
tmp[0] = 1;
rootIndexPath = tmp;

or maybe with:

listview.setRootIndexPath( [1] );

Let me know

Tags: BlackBerry Developers

Similar Questions

  • How to create bookmarks with javascript?

    Hello!

    I have a question about the creation of boomarks with javascript.

    I use the following line to create bookmarks:

    this.bookmarkRoot.createChild (words [i], ' pageNum = one "" ");


    The problem is that the bookmarks are created but all lead to the same page.

    Get the complete code:

    / Put the title of the script here.

    var string2 = [];

    string2 = "Word, example; test. "

    Var words = words.split(";");

    var N = words.length;

    for (i = 0; i < N; i ++) {}

    pageArray var = [];

    var string = words [i];

    for (variety p = 0; p < this.numPages; p ++) {}

    for (var n = 0; n < this.getPageNumWords (p); n ++) {}

    If (this.getPageNthWord (p, n) is {words [i]})

    pageArray.push (p);

    a = pageArray [0];

    this.bookmarkRoot.createChild (words [i], ' pageNum = one "" ");

    break;

    }

    }

    }

    }

    Any help is very appreciated!

    It seems that the variable a is useless and only one line:

    this.bookmarkRoot.createChild (words [i], 'pageNum = "+ p);

  • A Web site that I use States: this agency will support is no longer using the Protocol of internet security TLS 1.0 or 1.1 - how to change this with Firefox?

    I use a site that now has the following statement:

    Safety notice: as part of our ongoing efforts to improve security, this agency will be no longer support the use of the internet security TLS 1.0 protocol effective August 1. In addition, we will also stop the support for the Security Protocol Internet TLS 1.1 on 1 September. This means you must update your browser to use this site. For any questions about the update, please consult your browser provider.

    How do I change this?

    Unless your Firefox settings have been changed, Firefox is ready for sites that use TLS 1.2, the latest version of the SSL protocol.

    For example, if you click on the Green padlock on this site, so more information, the bottom of the Panel security in the Page Info dialog box should show that the page was encrypted using TLS 1.2. I have attached a screenshot showing where to find this information.

    Can you confirm that this works?

  • I have a pre-installed version of Windows 7 Ultimate OEM, how to change this with Windows 7 Ultimate SP1 new product main which I was recently transferred without own re - install the OS

    I have a laptop Wipro that comes with an OEM installed windows 7. Now I have a new windows 7 ultimate with SP1 product key, and I'm looking for change my product key directly without having to re - install full OS. Please suggest, thank you 1

    Click Start, type: slui.exe 3

    Press enter

    Enter the new product key, and then click next to activate via the Internet.

  • How can change starting with wireless keyboard

    If you use a wireless keyboard, how a start in recovery (CMD - R) Mode or disk mode target (T)?

    It works exactly the same way as a wired keyboard. Restart your Mac and hold down the T or command + R on the keyboard.

    If there is a discrepancy, you can do a little faster. Target disk mode can also be launched using System-> startup disk preferences.

  • How to change product with Adobe Creative Cloud Packager.

    Hello

    Have 12 servers Citrix XA 6.5 with Adobe Photoshop elements installed 11 currently on them.

    I want to upgrade to Adobe Photoshop elements with Adobe Creative Cloud Packager 13.

    For this, I have created a package with Adobe Creative packer of cloud, but can not choose when you create this package to upgrade rather than a new installation.

    Is this possible with Adobe Creative Cloud Packer? Or I have to buy another version of the PSE13 software (upgrade)?

    Thanks verry much for your helpful reply.

    With sincere friendships.

    Frank Jansen

    Frank,

    You will be able to use the same software you bought assuming you purchased volume licenses.

    You must create new installation package for PSE 13 as a result of process as below:

    Photoshop Elements 13 | First 13 items | Silent installation and deployment Instructions

    Thank you

    Florian

  • How to change PC with the same license of Adobe CS 5.5?

    I want to upgrade to a new PC and remove the old. What do I need install Adobe Creative Suite 5.5 on the new PC without falling on license issues? I still have the original .7z and installation .exe files. Is this what I need?

    If you have your original .exe and .7z, then that should be all you need to physically install the product on the new machine - just follow the instructions for how to move Adobe CS5.5 between systems and you should be fine

  • How mode change and get the coordinates of the text frame?

    Hello.

    There are two questions.

    1. how to change fashion using JavaScript?  writing-> selection

    ->

    2. how to get the text frame coordinates?

    Thank you.

    1 app.toolBoxTools.currentTool = UITools.SELECTION_TOOL;

    2. f.geometricBounds (where f is your block of text).

  • How to change the language settings in firefox using JavaScript

    My question is: how to change the language settings in the use of JavaScript in firefox:

    I want to set the value of intl.accept_languages en using JavaScript.

    How can I do?

    EDIT: The reason mail, I want to do is to be able to run selenium for different languages test scenarios with manually change them rather progrmmetically

    You will need to close and open the pref via user.js or prefs.js before restarting Firefox to perform the next test.

    See:

  • I recently bought an iPhone 6s I have loaded with my iTunes support information (old phone an iPhone 5). Problem is that I now have a replica on both phones I have an Apple ID - how to change the apple on the new ID

    I recently bought an iPhone 6s I have loaded with my iTunes support information (old phone an iPhone 5). Problem is that I now have a replica on both phones I have an Apple ID - how to change the apple on the new ID

    What do you mean by 'repetition '?

    You use two phones? Or did you give the old phone to someone else? If you use two phones, one ID on both Apple is probably than most people. Before you give or sell an iOS device, you must sign in iCloud in settings > iCloud and restore the device as good as new.

  • How to change the extensions on several files with Windows 7?

    * Original title: Extentions

    How to change the extensions on several files with Windows 7?

    You hear no doubt, is that your movie software will only recognize certain types of image file formats.  If this is the case, you will need to reformat format files to any format PNG is recognizable by the software.

    Rather than we guess, please identify your «film» software

    Download and install IrfanView, which is a free utility for images.  http://www.IrfanView.com/

    IrfanView has the ability to read a great many formats of image files.  It can also convert image files formats.  And even better - for you - it can do all these things on a batch of files.

    As test, after I installed IrfanView, open one of your PNG files.  Now click on file > save as, and select the 'Save as Type' to be little matter the file type of your movie software will accept.  Save the file.  Make sure your movie software can accept the new file.

    Once you are convinced that you can modify files that you have in a format that you can use, use IrfanView

    File > Batch Conversion/Rename command.  If necessary, see IrfanView help on this topic.

  • How to change BlackBerry Smartphones Blackberry ID associated with my phone

    Hello

    How can I change the Blackberry ID associated with my phone?

    When I try to change it in the options it says invalid password even though I can connect with the new ID from the web browser.

    Please notify.

    Thank you

    Samer

    Hello and welcome to the community!

    Here's a knockout who deals with this situation:

    • KB26694 How to change the BlackBerry ID on a BlackBerry smartphone or BlackBerry PlayBook Tablet

    The resolution is drastic, I agree... but it is what it is.

    Good luck and let us know!

  • How to change the color using JavaScript

    How you specify the color of a shape by using JavaScript to animate?  The code below does not work.  I'm not find documentation on how to work with JavaScript in Animate out snippets of code in box provided.

    this.redBox.style.color = "#00FF00";

    this.redBox.style.color = "rgb (155, 102, 102);

    The API chart in canvas mode is CreateJS. CreateJS is very well documented.

    EaselJS v0.8.2 API Documentation: Graphics

  • How to change or work with a .sket in Illustrator?

    How to change or work with a .sket in Illustrator? Can't select the object exported from the sketch. Thank you.

    Answer: You cannot directly use the .sket file.  You can send a JPG of the working version to everyone through stock supported options.

    Pseudo response (fast): If you want to work with vector paths in the project of the sketch (.sket) you will need a subscription Adobe CC ~.

    1. go in the specific figure that you want to send (click it like to change it in the application);

    2. send (Share) to Illustrator CC from the mobile application.  (to the same CC account you're connected to your iPad with);

    3. in Illustrator CC, choose from the options OBJECT toolbar > LINE & SKETCH ART > EXPAND to PATHS

    NOTE: This does not apply to the work of the brush.  It converts your work simple and features traces, change your work to something that does not resemble the project of .sket.  Fortunately, it does not save the file .sket of origin.

  • How to change a shape with an effect added to this topic?

    I'm trying to cut a hole in a circle that I applied an effect to the. When I use the Pathfinder tool unite it causes the effect to apply inside the shape. I just want it to be a regular circle without effect on her. How to change the form so it's just sold form?


    Screen Shot 2015-09-18 at 12.54.11 PM.png This is what is going to be.  I want the inner ring to be just the same, without effect.


    Screen Shot 2015-09-18 at 12.48.01 PM.pngI want to look like this. Here I have just a white circle on top of it without the Pathfinder unite added to it.

    Select the shape with the applied effect, and choose object > decaying appearance.

    Re-Pathfinder operation attempted.

Maybe you are looking for