ListView loads wrong model behavior data / not deterministic?

I have a fife ListViews that you can scroll between. Its type is assigned to each of them, and it shows its own set of data.

typeA: 1-10, typeB: typeC from 0.1 to 1: 1 to 15, typed: 1-10, type: 0.5 to 5

Its just qml and looks like this (main.qml):

import bb.cascades 1.0

Page {
    Container {

        layout: DockLayout { }

        ListView {
            id: unit_list

            maxHeight: 300
            maxWidth: 300

            layout: StackListLayout {
                orientation: LayoutOrientation.LeftToRight
            }

            dataModel: GroupDataModel {
                grouping: ItemGrouping.None
                sortingKeys: [ "position" ]
            }

            snapMode: SnapMode.LeadingEdge

            listItemComponents: [
                ListItemComponent {
                    type: "unit_list"
                    QuantitySelectList {
                    }
                }
            ]

            attachedObjects: [
                ImagePaintDefinition {
                    id: background_typeA
                    imageSource: "asset:///images/typeA.png"
                },
                ImagePaintDefinition {
                    id: background_typeB
                    imageSource: "asset:///images/typeB.png"
                },
                ImagePaintDefinition {
                    id: background_typeC
                    imageSource: "asset:///images/typeC.png"
                },
                ImagePaintDefinition {
                    id: background_typeD
                    imageSource: "asset:///images/typeD.png"
                },
                ImagePaintDefinition {
                    id: background_typeE
                    imageSource: "asset:///images/typeE.png"
                }
            ]

            onCreationCompleted: {
                // fill the quantity select set
                dataModel.insert({
                        "position": 0,
                        "unit": "typeA",
                        "background": background_typeA.imagePaint
                    });
                dataModel.insert({
                        "position": 1,
                        "unit": "typeB",
                        "background": background_typeB.imagePaint
                    });
                dataModel.insert({
                        "position": 2,
                        "unit": "typeC",
                        "background": background_typeC.imagePaint
                    });
                dataModel.insert({
                        "position": 3,
                        "unit": "typeD",
                        "background": background_typeD.imagePaint
                    });
                dataModel.insert({
                        "position": 4,
                        "unit": "typeE",
                        "background": background_typeE.imagePaint
                    });
            }

            function itemType(data, indexPath) {
                return "unit_list";
            }
        }
    }
}

and (QuantitySelectList.qml):

import bb.cascades 1.0

Container {
    id: quantity_container

    maxHeight: 300
    maxWidth: 300

    background: ListItemData.background

    ListView {
        id: quantity_list

        maxHeight: 300
        maxWidth: 300

        signal updateQuantity(variant quantity_index_path)

        layoutProperties: StackLayoutProperties {
            spaceQuota: 1
        }

        dataModel: GroupDataModel {
            grouping: ItemGrouping.None
            sortingKeys: [ "position" ]
            objectName: "quantity_select_set"
        }

        snapMode: SnapMode.LeadingEdge

        listItemComponents: [
            ListItemComponent {
                type: "quantity"
                Container {
                    id: quantity_view

                    minHeight: 300
                    minWidth: 300

                    attachedObjects: [
                        TextStyleDefinition {
                            id: quantity_text_style
                            base: SystemDefaults.TextStyles.SubtitleText
                            color: Color.Black
                            fontWeight: FontWeight.Normal
                            fontSize: FontSize.PointValue
                            fontSizeValue: 36.0
                        }
                    ]

                    horizontalAlignment: HorizontalAlignment.Fill
                    verticalAlignment: VerticalAlignment.Fill

                    Label {
                        text: ListItemData.amount
                        horizontalAlignment: HorizontalAlignment.Center
                        verticalAlignment: VerticalAlignment.Center
                        textStyle {
                            base: quantity_text_style.style
                        }
                    }
                }
            }
        ]

        onCreationCompleted: {
            // fill the quantity select set
            // if (ListItemData.unit == "typeA") {
            if (ListItemData.position == 0) {
                for (var a = 1; a < 11; a ++) {
                    dataModel.insert({
                            "amount": a,
                            "position": a
                        });
                }
            } else if (ListItemData.unit == "typeB") {
                for (var a = 1; a < 11; a ++) {
                    dataModel.insert({
                            "amount": 0.1 * a,
                            "position": a
                        });
                }
            } else if (ListItemData.unit == "typeC") {
                for (var a = 1; a < 16; a ++) {
                    dataModel.insert({
                            "amount": a,
                            "position": a
                        });
                }
            } else if (ListItemData.unit == "typeD") {
                for (var a = 1; a < 11; a ++) {
                    dataModel.insert({
                            "amount": a,
                            "position": a
                        });
                }
            } else if (ListItemData.unit == "typeE") {
                for (var a = 1; a < 11; a ++) {
                    dataModel.insert({
                            "amount": 0.5 * a,
                            "position": a
                        });
                }
            }
        }

        function itemType(data, indexPath) {
            return "quantity";
        }
    }
}

The problem is that some lists are not displayed with the data sets as they should. If I start it that I see for example typed list and list of typeB have converted their data sets. If I scroll quickly, it can happen then another two lists take their data sets. How can this happen?

ListView reuses it is ListItemComponents. Do not trust onCreationCompleted in QuantitySelectList, she will not be called when the re-use of components.

A possible workaround is detect when ListItemData changes and repopulate QuantitySelectList. This thread has an example:

http://supportforums.BlackBerry.com/T5/Cascades-development/how-to-detect-when-ListView-recycles-an-...

ListItem.onDataChanged: {
}

I have not tried.

Another thread suggests binding to a specific property of the ListItemData, but previous approach is better if it works:

http://supportforums.BlackBerry.com/T5/Cascades-development/QML-reset-properties-when-ListItemCompon...

In my projects, I generally implement lists in C++. There is a method that is called on the reuse of element.

Tags: BlackBerry Developers

Similar Questions

  • Error 1074395241: The model descriptor does not contain the data required for the corresponding rotation invariant.

    Hi all

    I use the model Match 4 IMAQ to detect the angle of rotation of an image of model. However, it displays the error: "error 1074395241: the model descriptor does not contain the data required for the corresponding rotation invariant." What exactly is the problem? How to solve this problem? The details are explained below.

    My project is a bit complicated. Part of the block diagram containing the IMAQ Match model 4 is illustrated below:

    The source image is a series of images of images read from an AVI video (I used a loop for to process the images frame by frame). The image of the model is an area of the first selected image. So, this means, the user selected the ineterst object in the first frame of the video, and each of the following images to find the object corresponding interest & determine its rotation angle. When I run the above diagram, there no error. However, it shows the angle of rotation zero no matter what it is 'really '. Therefore, I changed the schema by adding parameters, listed below:

    But in this case, when I run it, it shows the error I mentioned in the subject line.

    If you need more information about my project to identify the problem, please let me know.

    Thanks in advance.

    S ' Please example from model that comes with labview First
    Go to labview Help > find examples and you can search for example.
    -You create model with angle range and what kind of special criteria you want to use.
    -To do this you must use IMAQ learn pattern before using IMAQ model Match 4
    Reference:http://zone.ni.com/reference/en-XX/help/370281U-01/imaqvision/imaq_match_pattern_4/

  • HP connection manager exe. Could not load the Assembly system.data, Version = 1.0.61.0, culture = SQ Lite...

    have new laptop dv7 and continue to receive the window... HP connection manager exe.

    "Cannot load the Assembly system.data, SQ Lite, Version is 1.0.61.0, culture = neutrral, db937bc2d44ff139 = public key token.

    The application will now exit.

    Please identify your laptop / pc

    Look at the basic/back/side of the pc/laptop to the sticker with barcode.

    Item number of pole 2 as seen on the following example of label with barcode of a HP laptop. The barcode on your HP product may be slightly different in appearance, but will still have important information necessary for us to help you.

    #Do not post not the serial number of your product because it is private and considered to be personal information. ###

    Display the version of the operating system installed (State whether 32 or 64 bit) and the processor as one product AMD or Intel

    Not showing information as requested could delay our responses and troubleshooting slow the question that led you to create a thread. We want to help you, so please help us help you.

    Have you gone to your laptop's web support portal and tried the HP software box software?

    This would certainly be a good starting point.

    Removing and reinstalling the software HP Connection manager is also a good plan. It is also located on the web portal of support for your laptop.

    Best regards

    ERICO

  • Cannot figure out how to "add-in" for the 2013 Outlook application... said the loading behavior is not loaded. How can I fix it?

    Cannot figure out how to "add-in" for the 2013 Outlook application... said the loading behavior is not loaded. How can I fix it?

    Hi amandab9126792,

    2013 Outlook does not work with Acrobat X because they are not compatible. Please check the compatibility to https://helpx.adobe.com/acrobat/kb/compatible-web-browsers-pdfmaker-applications.html.

    Kind regards

    Nicos

  • In the model group data when list account data then 1 shows in the list field

    I have a Xml file contacts.xml, which is contained below...



    1
    SR Editor.
    Mike
    Chepesky


    In the PRC, I do just code below

    GroupDataModel * model = new GroupDataModel();
    XDA XmlDataAccess;
    QVariant list = xda.load)
    QDir::currentPath() + "/ app/native/assets/contacts.xml."
    (' / contacts/contact ");

    model-> insertList (()) list.value;

    QStringList key;
    key<>
    model-> setSortingKeys (key);
    model-> setSortedAscending (FALSE);

    listView-> setDataModel (model);

    When this XML have more then a refrigerated then given show in the listview, but when a refrigerated data does not show.

    Please help me...

    MOD Edit: Remove information staff to comply with the Community guidelines and the terms and Conditions of use.

    Hi Sumitava_Datta,

    Please report this issue in jira (developer Issue Tracker).

    I confirm this Zmey solution work. I tried it myself and it indeed gives a solution to this bug. Just use isEmpty() instead of isNull(), who is not recognized as a valid QVariantList function.

    QVariant list = xda.load(
    QDir::currentPath() + "/app/native/assets/contacts.xml",
    "/contacts/contact");
    
    QVariantList l = list.value();
    if (l.isEmpty())
      model->insert(list.value());
    else
      model->insertList(list.value());
    
  • Implementation error when executing load interface to Essbase data.

    When executing an interface to Essbase data loading I get this error:
    rg.apache.bsf.BSFException: exception of Jython:
    Traceback (most recent call changed):
    File "< string >", line 26, < module >
    at com.hyperion.odi.essbase.ODIEssbaseDataWriter.loadData (unknown Source)

    at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)

    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

    at java.lang.reflect.Method.invoke(Method.java:597)


    com.hyperion.odi.essbase.ODIEssbaseException: com.hyperion.odi.essbase.ODIEssbaseException: invalid column type specified for the column of data [ActivityPurpose]

    The data store is reversed using the RKM Hyperion Essbase, I did not any changes in the data store.
    I'm loading from an identical to the tabel of target array.
    I use the IKM SQL for Hyperion Essbase (DATA).

    Does anyone have any idea what this might be?

    Concerning
    Hans-Petter

    Might be useful to have a read of the following doc Oracle Support - "how to avoid signs of ' ODIEssbaseException: invalid column type specified for the data column" Message When loading Essbase models ODI? ". [ID 885608.1] »

    See you soon

    John
    http://John-Goodwin.blogspot.com/

  • Model outfit do not update form fields

    I use a model defined in the ActionScript code that refers to a gateway, DAO and beans that are extracted variations of a ColdFusion example generated by the wizard. I am able to release and to see that data comes back fine from the remote call, and my < model > object data is correct, because I use Alert.show () to see. However, even if the data in the mxml model are visible and correct, is not to update the fields that are related to IT... with one exception...

    In fact, it works if I hit "Refresh" browser after loading at once. However there is another issue with the update, as the history.js file is apparently causing the page to keep refreshing until randomly, it stops or stops on a javascript error ["line: 494-'null ' is null or not an object]. To the point where it stops, I am able to pull up data without a problem.

    I use a Flex Builder "generated by the Wizard" project of ColdFusion as a reference and the only difference I see is that they use a WindowManager to bring up the form with the data in it. I hope that's not the problem, but before I'll rebuild my application in this way, I'd love to hear if anyone else has had a similar experience, or it recognizes my problem.

    Related to the data in a model had to be updated somehow? I appreciate all help.

    I just tested on FireFox and got the same results. It loads only after a refresh.
  • The applicant type of window in the window of consultation of the client a model number will not accept it that

    Patiently, I try to enter data that will allow me to get a phone call from a support person about my problem with the camera three RX 100 model, which will not take a decent picture in the open air. All of the images appear dimmed. I tried to go through the computer section trying to get to a real person in the window asking the model type will not accept the type of model, it is tinted pink and will not accept the data. I'm very frustrated by the difficulties I encounter trying to get a conversation with a real person, that my phone number is 207-350-0201. Thank you

    Try 1-800-222-7669.

    I got this number on the Web site.

  • Error loading c:\windows\wvowikrrevafide.dat

    Error loading c:\windows\wvowikrrevafide.dat
    the specified module could not be found

    This message is displayed on every 2 minutes

    The file is usually used during the uninstallation of a program - they are very common. Due to their nature, they are often reported as potential problems. The entrance of R3 is linked to Yahoo and is legitimate. If you can't fix it yourself, try visiting http://support.microsoft.com/ for help online.

  • oracle.jbo.NoDefException: Houston-25002: definition of the type of the view definition com.model.ModVariablesView is not found.

    Hi all

    I am a newbie with ADF, I developed a test using Jdeveloper 12.1.3.0 application and it works very well on the integrated weblogic Domain.

    When I deploy the application (EAR and directly to Weblogic bot) to a second domain weblogic application fails to load to return the following error message:

    oracle.jbo.NoDefException: Houston-25002: definition of the type of the view definition com.model.ModVariablesView is not found.

    at oracle.jbo.mom.DefinitionManager.findDefinitionObject(DefinitionManager.java:880)

    at oracle.jbo.mom.DefinitionManager.findDefinitionObject(DefinitionManager.java:766)

    at oracle.jbo.mom.DefinitionManager.findDefinitionObject(DefinitionManager.java:748)

    at oracle.jbo.server.MetaObjectManager.findMetaObject(MetaObjectManager.java:862)

    at oracle.jbo.server.ViewDefImpl.findDefObject(ViewDefImpl.java:874)

    ........................................................................................................................

    The application has been updated to include EJB jar files in the ear.

    Any help is greatly appreciated.

    Kind regards

    Mihai

    The view definition is mentioned in the DataBindings.cpx file? In the DataBindings.cpx page definition files may need to be changed. Please post the DataBindings.cpx.

    See also

    Blog of melissa SOA: ADF 11 g Houston-25002: definition "VO" type View Definition is not found error

  • Gives the Script import FDM of oracle RDB to import - import has failed. Data not valid or empty content.

    Hi all

    I create an FDM interface to extract data from Oracle RDB and onto an essbase database. I feel that if you have to shoot the script import data of RDB, you must create an integration. So I created a script to import integration based on the example given in the FDM Document admin.

    The Script is as below:

    Function PSIP_TEST (lngCatKey, dblPerKey, strLoc, strWorkTableName)

    '------------------------------------------------------------------

    "Import oracle Hyperion FDM integration script:

    '

    ' Created By: admin

    "Creation date: 18/02/2014-18:00:33.

    '

    ' Object:

    '

    '------------------------------------------------------------------

    Dim cnSS ' ADODB. Connection

    Dim strSQL ' SQL string

    Dim rs ' Recordset

    Dim rsAppend ' tTB table add rs object

    'Initialize objects.

    Define the cnSS = CreateObject ("ADODB. Connection")

    Set rs = CreateObject ("ADODB. Recordset')

    Set rsAppend = DW. DataAccess.farsTableAppend (strWorkTableName)

    "To connect to the Oracle database

    CNSS. Open "Provider = OraOLEDB.Oracle.1; Password = PSIP_TST; Persist Security Info = True; User ID = PSIP_TST; Data Source = PSIP.

    ' Create the query string

    strSQL = "SELECT YEAR, COST_CENTRE, PROGRAMME_CODE, PROJECT_CODE, ACCOUNTS, AMOUNT FROM VW_PSIP_EBUDGET_ESTIMATES.

    «Get data»

    RS. Open strSQL, cnSS

    "Locate the data.

    If rs.bof and rs.eof then

    RES. PlngActionType = 2

    RES. PstrActionValue = "no records to load!

    Exit Function

    End If

    ' Loop through records and add table APCs to place DB

    If it is rs.bof and not rs.eof then

    While Not rs.eof

    rsAppend.AddNew

    rsAppend.Fields ("PartitionKey") = RES. PlngLocKey

    rsAppend.Fields ("CatKey") = RES. PlngCatKey

    rsAppend.Fields ("PeriodKey") = RES. PdtePerKey

    rsAppend.Fields ("DataView") = "CDA".

    rsAppend.Fields ("CalcAcctType") = 9

    rsAppend.Fields ("Account") = rs.fields ("ACCOUNTS"). Value

    rsAppend.Fields ("Entity") = rs.fields ("COST_CENTRE"). Value

    rsAppend.Fields ("UD1") = rs.fields ("COST_CENTRE"). Value

    rsAppend.Fields ("node2") = rs.fields ("PROGRAMME_CODE"). Value

    rsAppend.Fields ("UD3") = rs.fields ("PROJECT_CODE"). Value

    rsAppend.Fields ("Amount") = rs.fields ("Amount"). Value

    rsAppend.Update

    RS. MoveNext

    Loop

    End If

    "Loaded files

    RES. PlngActionType = 6

    RES. PstrActionValue = "import successfully!

    'Assign the return value.

    SQLIntegration = True

    End Function

    When I run the Script in the Script Editor, I get the following error:

    Error: An error occurred while running the script:

    -2147467259-data access error.

    Online: 19

    If I see in the error log, it is as follows:

    ERROR:

    Code... - 2147467259

    Description... ORA-00903: invalid table name

    Process... clsDataAccess.farsTableAppend

    The component... upsWDataWindowDM

    Version.......................................... 1112

    Thread........................................... 41900

    Nude of the line. 19 is as follows: Set rsAppend = DW. DataAccess.farsTableAppend (strWorkTableName) and, therefore, I thought that perhaps this is when I run the script in the Script Editor, perhaps that the value of the variable "strWorkTableName" does not get filled it is why it gives an error.

    So I ran the import stage in the Workflow, and Got the following error:

    Error: Failed to import. Data not valid or empty content.

    and there is no entry in the error log.

    I'm lost, need your help please.

    One last thing, I would like to ask is kindly please post if my connection string is correct, either:

    CNSS. Open "Provider = OraOLEDB.Oracle.1; Password = PSIP_TST; Persist Security Info = True; User ID = PSIP_TST; Data Source = PSIP.

    I read that FDM is a 32-bit product and will require a connection 32-bit oledb provider.

    FDM here is installed on a 64-bit computer and the provider that is used here in the connection string is 64-bit.


    Please help, my work here came to a fixed support. Kindly help

    That would mean that your 32-bit TNSNAMES. ORA file does not have a good connect descriptor for what you provide in the UDL file.

    Check your TNSNAMES 32bits. ORA file and make sure you have a good connect descriptor for the Oracle database.

  • model project do not have access to the objects of viewcontroller

    Jdev 11.1.1.4

    I have created classes, java in the project of viewcontroller but when I try to use them in the ViewObjectImpl or other classes in the model project do not have access to it. Compiler complaints (also previously during editing):

    -"the edu.univ.view package does not exist"--> in the sentence 'import '.
    -'Cannot find the class UserData'-> when I try to access the class.

    This is not the first time that happens to me, but not always. Any definition must be something wrong.

    I can fix this if I copy the text of the class and I create a new class in the model project exactly the same as in the viewcontroller project.

    Any suggestion?

    You can call the method in your backing bean as methodCallActivity. Just drop the methodCallActivity in the component palette into your taskflow and double-click on it to link it to the method in your backing bean.

    Arun-

  • Batch loader, loading excel models in FDM

    Hi Experts,

    I am very new to FDM. In our project, we will use the version 11.1.1.3.

    I know this is the place where we get assistance and clues to reach things or solve problems. Thank you all experts for your contribution here.

    I know the basics of FDM and has had the opportunity to work on development. So, I have gathered the requirements and began to install and configure the software.

    I need to reach the underside of the things in this project using FDM. If my question is not understandable or no sense please forgive me.

    * extract data from Oracle business suite enterprise (EBS 12) and refresh the Essbase cubes.

    My solution: I intend to use ERPI to achieve.

    * Drill through in the following Oracle enterprise business (EBS 12) for data to know less than BSE.

    My solution: I intend to use ERPI to achieve.

    * Load excel sheets in target applications.

    I don't know what to do here. Please let me know how can achieve us.

    To automate the update process.

    I know it's charger batch to do this activity. But my question is, if the files are to come in the form of text or CSV, let's use the batch charger. If you create rules for the loading of the meta data and how we will get it.


    I'm really appreciate your time and help on this.




    Thank you very much
    Ganesh.

    No problem. If you get a moment, take the time to lodge answers that were useful or correct.

    Thank you

  • I get the following errors 2 media loading 1) error: file could not be played &amp; 2) html5: badly encoded video. What should I do to fix this?

    For example, I go to http://jwplayer.com and when I click to see the video I get the following error:
    "Error loading of media: file could not be played.

    Now for the other mistake... I go to a site where the video looks to his will start and it turns white with the error "html5: badly encoded video."

    I went to http://detectmybrowser.com and in the section check the HTML5 video webm and h264 are red (which means that I don't have these plugins that I guess)

    Then... How to fix this?

    Maybe you need this:
    Windows Media Feature Pack for Windows 7 N and Windows 7 KN:

  • Automation of data not in Piano roll - Please Help

    I was wondering if someone could kindly help please

    I use an external controller on a keyboard to change things like cut wide in the ES2 when you use a synth.

    After the change in writing Automation data appears in the area of popular songs, but I can't understand how to do so that he can show below the events of midi notes in the piano roll editor and allow me to also change it. I can always change the same midi control function (like cutting) and he appears in the form of empty data not what I recorded and any change overrides greater automation in terms of titles.

    Is there a way to show the recorded data automation in the piano roll allowing me also change please?

    Thanks for any help

    Use the region based instead of track based automation...

    Click on the image if you don't see it animated...

Maybe you are looking for