The list of predefined items regex

Hello

right now I'm working on a stream of work that provides a virtual machine, either from scratch or model.

I want to make a selection of all the models (virtual machines) that contains "_Template".

I created an input parameter as a list of predefined using the action items ' GetAllVM'sMatchingRegexp '.

So here's what it looks like at the moment:

GetAction("com.vmware.library.vc.vm","getAllVMsMatchingRegexp").call ("(.)") (*_modèle/ig) ')

But no results are displayed. Perhaps some can help me with that?

Thank you and best regards,

Weda

Hello

I suggest to replicate the existing action of getAllVMsMatchingRegexp to, say, getAllVMsMatchingRegexp2and make a small change to its script code to resemble the following

// Get all Virtual Machines for all vCenter connections defined for this plugin
var allVms = VcPlugin.getAllVirtualMachines();
var vms = new Array();
// Check if the VM match the regexp
for (var i in allVms) {
  if (allVms[i].name.match(new RegExp(regexp, "gi"))) {  // here is the only difference from the old action
    vms.push(allVms[i]);
  }
}
return vms;

Then, change the list of predefined items to use

GetAction("com.vmware.library.vc.vm","getAllVMsMatchingRegexp2").call( "Template$" )   // will match the names ending with 'Template'

Tags: VMware

Similar Questions

  • 'To' line does not appear in the list of sent items - Live Mail 2013

    For sent items, bar of the list on the left displays subject but is NOT recipient. The recipient of the Windows\SendTo\Mail. MAPMail file exists with contents "Mail" (as recommended in a previous answer how-to). Note that originally the Live Mail delivered with Windows 7 version did not have this problem. Pleas help - another I guess that something other that Live Mail will have to be the answer. Thank you!

    Ok. I'm not sure that Microsoft Update you can refer to, but if mail window was totally different as you say, I can only assume that your Windows Live Mail very late has been improved from version 2009 to version 2011-, as you can see, the version you have is released two years ago and a half and has been updated / updated several times since then. Can you identify the update?

    Regarding the anomaly of display, it is difficult for me to visualize the problem. It may be that the update is not successfully save the message headers in the message database. On the view tab, select Conversations > Off and of messageliste > view a line. You can then select the columns to display in what order by right clicking on a column header and select columns.

    • What do you see in the column ? He is the recipient?
    • Is the entry in quotation marks?
  • Definition of specific CSS on some items in the list of suggested items.

    Hi all

    IM using Jdev 12.1.3 and skin of alta

    I have a text entry field with bound to a method getSuggestItems in pageFlowScope.quickSearchBean AutoSuggestBehavior.

    The method returns a list of items. I want to add a select element at the end of the list and then style it

    Is it still set some specific css for some items in the playlist

    Thanks in advance

    DAT

    Hello

    You can do something like this:

    UL [id ^ = 'it1'] li [_afrlabel ='MySelectItemLabel ']}

    style

    }

    It1 the ID of your InputText and MySelectItemLabel is the label of the element you want to style.

    You can also use _afrvalue instead of _afrlabel.

    It will be useful.

    Kind regards

    Ruben.

  • the gap between the list of select items in af:selectOneRadio?

    Hi all

    My version of Jdeveloper is 11.1.1.7.0.

    I have an af:selectOneRadio and select the button elements are added to this radio. But if we have four values then there is no space between each value of the element vertically.

    How to provide the gap between the value of each item select vertically?

    How can I achieve this requirement?

    Please provide your valuable suggestions.

    Thank you.

    This is not a style class but a skin selector, you need to add in your own skin file. Instructions on how to create a skin file based on an existing one are in the article that I posted the link.

    Here's what I see

    Timo

  • Recent articles: is it possible to retrieve a list of recent items passed?

    Is it possible to retrieve a list of recent past items.  I am trying to determine if a file has been accessed and then removed from the list of recent items.  If possible, how do you do that?

    The list is stored in C:\Users\\Recent and there may be different lists for each user.  There is no real way to know if an item has been removed from the list, unless it is in the trash (which is unlikely).

    To check the Ffichier, go to Windows Explorer and navigate to the file that you are concerned about. Right-click on the headers, click more and add the access Date column.  Then you can see the last time someone accessed the file.  It's just as good as the list of recent files to find out when a person access to a file (and it cannot be deleted without deleting the file).

    I hope this helps.

    Good luck!

    Lorien - MCSA/MCSE/network + / has + - if this post solves your problem, please click the 'Mark as answer' or 'Useful' button at the top of this message. Marking a post as answer, or relatively useful, you help others find the answer more quickly.

  • bug using the list and treeset

    I have a problem in the real world where I get a list of the retail store and get the distance of the starting places group and a location closest to you find the 10 for each starting locations. I'm back from getdata a list of stores loop in each store and calculate the distance and put them in a treeset for sorting. Problem is when the second set of data is added to the treeset that the original game is replaced with a duplicate of the second set. a very simple test for this case is:
    package treeset;
    
    import java.util.Comparator;
    import java.util.Iterator;
    import java.util.LinkedList;
    import java.util.List;
    import java.util.TreeSet;
    
    import java.io.Serializable;
    
    //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
    // Class TreeSetExample
    //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
    /**
     * The TreeSetExample demonstreates a odity in the sorting of list using a treeset
     *
     * @version 1.0, 04/06/2011
     * @author  Douglas Nelson
     * @author  copyright Oracle 2011
     * @author  Unauthorized use, duplication or modification is strictly prohibited.
     */
    public class TreeSetExample extends Object {
    //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
    // start constructor
    //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
    /**
     * Constructs a TreeSetExample object
     */
    public TreeSetExample() {
    
    } // end constructor
    //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
    // start getData
    //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
    /**
     * getDatea
     */
    public List<SimpleVO> getData() {
    
       List<SimpleVO> returnList = new LinkedList<SimpleVO>();
    
       SimpleVO simpleVO = null;
    
       for (int i = 0;i < 5;i++) {
    
          returnList.add(new SimpleVO());
    
       } // end for
    
       return(returnList);
    
    } // end getData
    //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
    // start runTest
    //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
    /**
     * runTest - Test the insert sorting of a tree set with a list of data
     * @param loopCount number of time to load data into the saveset
     */
    public void runTest(int loopCount) {
    
       List<SimpleVO>    simpleList   = getData();
       SimpleVO          simpleVO     = null;
       TreeSet<SimpleVO> saveSet      = new TreeSet<SimpleVO>(new simpleComparator());
       SimpleVO          tempSimpleVO = null;
    
       Iterator<SimpleVO> iterator      = null;
       Iterator<SimpleVO> printIterator = null;
    
       int id = 0;
    
       for (int i = 0; i < loopCount;i++) {
    
          iterator = simpleList.iterator();
    
       //--------------------------------------------------------------
       // for each of the user's zip codes find the distance to the RSL
       //--------------------------------------------------------------
       while (iterator.hasNext()) {
    
          simpleVO = iterator.next();
    
          id ++;
    
          simpleVO.setName("" + id);
    
          saveSet.add(simpleVO);
    
       } // end while
    
       //--------------------------------------
       // print saveset at the end of each load
       //--------------------------------------
       System.out.println("list count after loop [" + (i + 1) + "] number of elements = [" + saveSet.size() + "] contents:");
    
       printIterator = saveSet.iterator();
    
       while(printIterator.hasNext()) {
    
          tempSimpleVO = printIterator.next();
    
          System.out.println(" save simpleVO name = [" + tempSimpleVO.getName() + "]");
    
       } // end while
    
       } // end For
    
    } // end runTest
    //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
    // start main
    //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
    /**
     * IbotMailParser main thread
     * @param arg standard main input string array.
     */
    public static void main(String[] arg) {
    
       System.out.println("Main - Started");
    
       try {
    
          System.out.println("*************** starting test 1 *********************");
    
          TreeSetExample treeSetExample = new TreeSetExample();
    
          treeSetExample.runTest(1);
    
          System.out.println("\n");
          System.out.println("\n");
          System.out.println("*************** starting test 2 *********************");
    
          treeSetExample.runTest(2);
    
       } // end try
       catch (Exception any) {
    
          System.out.println("Exception [" + any.getMessage() + "]");
    
       } // end catch
    
       System.out.println("Main - we gone bye-bye...!");
    
    } // end main
    //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
    // Class SimpleVO
    //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
    /**
     * The SimpleVO is a value object pattern used for this example
     *
     * @version 1.0, 04/06/2011
     * @author  Douglas Nelson
     * @author  copyright Oracle 2011
     * @author  Unauthorized use, duplication or modification is strictly prohibited.
     */
    public class SimpleVO extends Object {
       /**
        * Default user name for Oracle connection.
        */
       private String name = "";
    
       //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
       // start getName
       //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
       /**
        * Returns the name value associated with this attribute
        *
        * @return String - the Name parameter
        */
       public String getName() {
    
          return(name);
    
       } // end getName
       //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
       // start setName
       //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
       /**
        * Sets the name value for this attribute
        *
        * @param newName the Name to be set
        */
       public void setName(String newName) {
    
          if (newName != null) {
    
             name = newName.trim();
    
          } // end if
    
       } // end setName
    
    } // end SimpleVO
    //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
    // Class simpleComparator
    //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
    /**
     * The SimpleComparator is a comparator object used for sorting simple value objects
     *
     * @version 1.0, 04/06/2011
     * @author  Douglas Nelson
     * @author  copyright Oracle 2011
     * @author  Unauthorized use, duplication or modification is strictly prohibited.
     */
    public class simpleComparator implements Comparator<SimpleVO>, Serializable {
    
       //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
       // start getName
       //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
       /**
        * Returns the name value associated with this attribute
        *
        * @return String - the Name parameter
        */
       public int compare(SimpleVO simpleVO_1, SimpleVO simpleVO_2) {
    
          return(1);
    
       } // end compare
    
    } // end SimpleComparator
    
    } // end class TreeSetExample
    output:

    c:\treeset > java treeset. TreeSetExample
    Hand - started
    from test 1 *.
    County from the list after several loop [1] items = [5] content:
    you save simpleVO name = [1]
    you save simpleVO name = [2]
    you save simpleVO name = [3]
    you save simpleVO name = [4]
    you save simpleVO name = [5]

    from test 2 *.
    County from the list after several loop [1] items = [5] content:
    you save simpleVO name = [1]
    you save simpleVO name = [2]
    you save simpleVO name = [3]
    you save simpleVO name = [4]
    you save simpleVO name = [5]
    County from the list after several items loop [2] content = [10]:
    you save simpleVO name = [6]
    you save simpleVO name = [7]
    you save simpleVO name = [8]
    you save simpleVO name = [9]
    you save simpleVO name = [10]
    you save simpleVO name = [6]
    you save simpleVO name = [7]
    you save simpleVO name = [8]
    you save simpleVO name = [9]
    you save simpleVO name = [10]
    Hand - we go... Bye Bye!

    Published by: EJP 07/04/2011 10:44: Add code tags. Please use them.

    Here, I added a string comparison. TreeSet stil works.

    package scratch;
    
    import java.util.ArrayList;
    import java.util.Collections;
    import java.util.Comparator;
    import java.util.LinkedHashSet;
    import java.util.List;
    import java.util.Set;
    import java.util.TreeSet;
    
    public class TreeSetWorks {
      public static void main (String[] args) throws Exception {
    
        List list = new ArrayList ();
        Set insertionOrderSet = new LinkedHashSet ();
        Set comparator1OrderedSet = new TreeSet (new SimpleVOComparator1 ());
        Set comparator2OrderedSet = new TreeSet (new SimpleVOComparator2 ());
    
        for (int i = 5; i <= 15; i++) {
          SimpleVO vo = new SimpleVO();
          vo.id = i;
          vo.name = "VO-" + i;
          list.add(vo);
        }
    
        System.out.println ("preshuffle list : " + list);
        Collections.shuffle (list);
        System.out.println ("postshuffle list : " + list);
    
        System.out.println ();
    
        for (SimpleVO vo : list) {
          insertionOrderSet.add (vo);
          System.out.println ("addded " + vo + " to insertionOrderSet : " + insertionOrderSet);
    
          comparator1OrderedSet.add (vo);
          System.out.println ("addded " + vo + " to comparator1OrderedSet : " + comparator1OrderedSet);
    
          comparator2OrderedSet.add (vo);
          System.out.println ("addded " + vo + " to comparator2OrderedSet : " + comparator2OrderedSet);
    
          System.out.println ();
        }
    
        System.out.println ("list                  : " + list);
        System.out.println ("insertionOrderSet     : " + insertionOrderSet);
        System.out.println ("comparator1OrderedSet : " + comparator1OrderedSet);
        System.out.println ("comparator2OrderedSet : " + comparator2OrderedSet);
      }
    }
    
    class SimpleVO {
      int id;
      String name;
    
      public String toString() {
        return name;
      }
    }
    
    class SimpleVOComparator1 implements Comparator {
      public int compare(SimpleVO vo1, SimpleVO vo2) {
        return
          vo1.id < vo2.id ? -1 :
          vo1.id > vo2.id ? 1 :
          0;
      }
    }
    
    class SimpleVOComparator2 implements Comparator {
      public int compare(SimpleVO vo1, SimpleVO vo2) {
        return vo1.name.compareTo (vo2.name);
      }
    }
    
    list                  : [VO-6, VO-5, VO-14, VO-7, VO-8, VO-11, VO-12, VO-15, VO-9, VO-10, VO-13]
    insertionOrderSet     : [VO-6, VO-5, VO-14, VO-7, VO-8, VO-11, VO-12, VO-15, VO-9, VO-10, VO-13]
    comparator1OrderedSet : [VO-5, VO-6, VO-7, VO-8, VO-9, VO-10, VO-11, VO-12, VO-13, VO-14, VO-15]
    comparator2OrderedSet : [VO-10, VO-11, VO-12, VO-13, VO-14, VO-15, VO-5, VO-6, VO-7, VO-8, VO-9]
    
  • Download the list of Manager losing items after 8 to 9 days

    The Windows system setting 8 (using the classic interface - Office looks like Windows XP). Firefox 25.0.1. All-in-One sidebar. Download Manager Tweak.
    Bought new computer with Windows 8, installed in August 2013, if no previous version of Windows on the computer.
    Exactly the problem is that the all-in-One sidebar Download Manager list items disappear from the list when they are 8 to 10 days. The elements are NOT removed from the list which is held in the download history at the same time, so I can still follow my download history who is lucky.
    Tests established that the Download Manager Tweak is not the cause of the problem.
    Window settings Firefox-Tools-Options-Downloads-Download Manager does not stop the problem, if the elements are checked with long-standing and large numbers or unchecked.
    There was no problem on my old computer using Windows 7, but it happened on the new computer from the purchase.
    Disappearance of items happens when all-in-One sidebar is not on display - i.e. Download Manager list isn't the show.

    Hi Cor - el,

    Thanks a lot for your answer.
    Sorry for the delay in the reply and thank you. I was scouring around to find what software was "ranger" lists. I think that I found it, but then what happened?
    Updated Firefox changed 26 ball the entire game and has completely undermined the entire scenario.
    Download Manager Tweak is not compatible with Firefox 26. I am trying to download Panel Tweak but currently I can't function.
    As with other comments on updates of Firefox, useful modules I use seem to become less with problems of compatibility with the latest versions of Firefox, so could investigate Chrome.

  • Y at - it somewhere I can find a list of items that is supposed to be running in activity monitor and those that should raise red flags?  I know the list varies depending on the applications and installed process but a base line would be nice

    Y at - it somewhere that I can find a list of explanations or definitions of applications that are running in the monitor of activity as well as a list of items that should raise red flags?  I realize account from the list will vary depending on the applications and programs installed and running, but it would be nice to have a base line of what should be expected and considered safe or normal.  There are too many items to research and one at a time.

    No, not so much.

    You have a problem you're trying to solve?

  • Refuses to pages to center the list items correctly (Pages 5.6.1)

    Hi guys! There is a problem with centering of the list items. When I create one of all kinds (numbered for example) and you want to place it in the center of the document, I get this:

    To move it to the right place (and I doubt that it is in fact a true Center) I need to use the list tab and use the left alignment as in the following image:

    Is there a way to make Pages to do things - to move the text with a number when I want to place it in the center of the document?

    Tried everything. Nothing works.

    Thanks in advance!

    [deleted - / viking] Thought I had it fixed, but apparently not.

  • I recently ran an anti malwarescan through my pc he gave me a list of 77 items found with some of the PUP. Optional.B PUPPY in option D... I and S, etc I do just remove tem from the list

    I recently ran an anti malware scan via my pc he gave me a list of 77 items found with some of the PUP. Optional.B PUPPY in option D... I and S etc I just remove them from the list

    Yes. Delete the PUP.

    You don't mention which program you used, but these are two very good freeware ones.

    Download the free versions of these tools. Always check the updates before the race.

    Malwarebytes Anti-Malware
    http://www.Malwarebytes.org/products/malwarebytes_free

    SuperAntiSpyware
    http://www.SUPERAntiSpyware.com/

  • Drag items to burn the list do not work in Media Player

    My Windows (in Windows XP service pack 3) player doesn't let me drag items from the library to the burn list album list. A response in January 2010 in this Forum doesn't help - everything he says is refer to the indications, which do not address this problem. Help!

    Re-register the WMP by clicking on Start - Programs - Accessories - right click
    Command prompt and choose Run as administrator. Type
     
    CD %Programfiles%\Windows Media Player
    For %A in (*.dll) do regsvr32 %a
     
    (Ignore an error you should get)
     
    In order to exclude other programs interfering with WMP use clean boot
    Troubleshooting
    http://support.Microsoft.com/kb/331796
     
    Check the alteration of the file by clicking on start - all programs - accessories -.
    Click with the right button on command prompt and choose Run as administrator. Type
     
    sfc/scannow
     
     
    --
    ..
    --
    "gyu333" wrote in message news: 1303 d 010-9362-4 d 67-b3e6-8b18f01a1be6...
    > My drive Windows (in Windows XP service pack 3) doesn't let me drag
    > the list items from the library to the burn list albums. A response in
    > January 2010 in this Forum is useless - everything he says, it is to refer to the
    > directions that do not deal with this particular problem. Help!
     
     
  • Find all the item in the list in QML

    I use ListView to display the list item. I'll put the data in the list using datamodel.

    At some point, I want to know what that any element is in the list. Is it possible to do this?

    for ex: list.getInput that returns all list items

    Welcome on the support forums.

    check the API of the datamodel you use, for example groupdatamodel
    https://developer.BlackBerry.com/native/reference/Cascades/bb__cascades__groupdatamodel.html

    all methods marked as Q_INVOKABLE can be called from qml, for example first() and after() you can iterate through its members.

  • How to get the content of the list item selected ListView using CPP?

    Hello

    I do a simple application, get the content of the list item selected ListView using CPP, in the main.qml file, I created a listview using XMLDataModel and I got the selected listview using dataModel.data (row) .attributeNameInXmlfile in qml. content as in the same way the ListView using cpp.please help me I want to get the content of the listitem selected.

    Here is my code

    hand. QML

    import bb.cascades 1.0
    
    Page {
        content: Container {
            id: mainContainer
            objectName: "container"
            // property alias selectedText: selectedTextField.text
            //property alias deselectedText: deselectedTextField.text
            ListView {
                objectName: "listView"
                dataModel: XmlDataModel {
                    source: "models/items.xml"
                    id: model
                }
                listItemComponents: [
                    ListItemComponent {
                        type: "item"
                        StandardListItem {
                            title: ListItemData.title
                        }
                    }
                ]
            }
            TextField {
                id: selectedTextField
                objectName: "selectedTextField"
                text: ""
            }
            TextField {
                id: deselectedTextField
                objectName: "deselectedTextField"
                text: ""
            }
        }
    }
    

    App.cpp

    #include "app.hpp"
    
    #include 
    #include 
    #include 
    #include 
    #include 
    #include 
    using namespace std;
    
    using namespace bb::cascades;
    QObject *textFieldSelected ;
    QObject *textFieldNotSelected;
    QObject *list;
    App::App() {
        QmlDocument *qml = QmlDocument::create("main.qml");
        AbstractPane *root = qml->createRootNode();
        list = root->findChild("listView");
        textFieldNotSelected = root->findChild("deselectedTextField");
        textFieldSelected = root->findChild("selectedTextField");
        QObject::connect(list,SIGNAL(selectionChanged (QVariantList, bool)),this,SLOT(changeText(QVariantList, bool)));
        Application::setScene(root);
    }
    
    void App::changeText(QVariantList indexPath,bool selected) {
    
    }
    

    App.HPP

    #ifndef APP_H
    #define APP_H
    
    #include 
    #include 
    #include 
    
    /*!
     * @brief Application GUI object
     */
    class App : public QObject
    {
        Q_OBJECT
    public:
        App();
    public slots:
    void changeText(QVariantList ,bool );
    
    };
    
    #endif // ifndef APP_H
    

    Try this.

    void App::changeText(QVariantList indexPath,bool selected) {
        XmlDataModel *model = (XmlDataModel *)list->dataModel();
        QVariantMap map = model->data(indexPath).toMap();
        // map is your data in QVariant
        qDebug() << map["title"].toString();
    }
    
  • failure of the deletion of an item in a list

    Hello

    I am new to AIR und QNX and try to work through documentation of the RIM.

    Now, I'm at http://developer.blackberry.com/air/documentation/playbook/ww_air_developing/Create_a_list_ms_197099...

    The program creates a list. If I click on a button, it should remove an item from the list. But it doesn't work. Maybe someone has an idea why?

    Just a second question:

    Is there a difference between these two lines? Which variant is to be preferred?

    myList.removeItemAt (1);

    myList.dataProvider.removeItemAt (1);

    Here the important parts of the code:

    Import qnx.fuse.ui.listClasses.List;

    private function initializeUI (): void

    {

    arrMonth.push ({label: "Jan"});

    arrMonth.push ({label: "Feb"});

    ...

    myList.dataProvider = new DataProvider (arrMonth);

    }

    private void myButtonEvent(event:MouseEvent):void

    {

    now remove an item

    option 1: works well!

    myList.removeItemAt (1);

    HERE, THE ERROR SE PRODUCT

    option 2: does not work

    error message: the item to remove is not found

    myList.removeItem ({label: "Jan"});

    I still don't understand the etiquette thing. So I tried that, but it didn't work either

    myList.removeItem ("Jan");

    }

    Thank you very much

    Sebastian

    RemoveItem, you give him the real object that was originally registered on the data provider (pointer reference). You cannot give a new object that has the same values of the original object. If you don't, then you must create a function that makes a loop on your table of data provider and compare the unique field (usually, 'data') of the object is passed to, then call removeItemAt, based on the index in the array.

    It is also a good idea to not rely on the label to be unique in the list. AS3 convention will usually have a 'data' field that is unique for the list. The data field can then be matched to. Without it and you have multiple items with the same label, will lead to problems of selection.

  • How to set the number of visible items in the drop-down list

    How can I specify the number of elements is visible in the list when I open a drop-down list? By default, I see 5 items, but I want to extend that to 10.

    Reference doc: http://www.blackberry.com/developers/docs/airapi/1.0.0/qnx/ui/listClasses/DropDown.html

    for example

    var dd:DropDown = new DropDown();
    DD.x = x;
    DD.y = y;
    dd.rowCount = 10 ; Set this value to the need... like for example 10
    CDI Width = w;
    CDI Height = h;

    ...

Maybe you are looking for