Refreshing Flex list item

Hello

I'm coding application mini cat in Flex 3.0 with PHP & MySQL.  Can I insert data in TextInput, also I can get data from database, but I have a little problem. I added a timer to update the list item (List item becomes data in mysql). But I could not. I updated the ArrayCollection collection, but it does not work.

Here are some application codes.

" < mx:HTTPService id = 'db2' url = ' http://localhost/Flex/list.php "result ="resultHandler (event)"/ >

[Bindable]
var datalist: ArrayCollection collection;

private void resultHandler(e:ResultEvent):void {}
DataList = db2.lastResult.data.chat;
lst.dataProvider = datalist;
}

< mx:List labelField = "tex" width = "322" height = "216" id = "lst" editable = "false" / >

What should I do?

Thank you

Here is an example very dirty how do, he needs a lot of storage but I leave you for this

Flex code:




    
        
    

    
        
            
                {dataDump}
            
        
    

    
        
            
                {newMsg}
            
        
    

    
    
    


sendMsg.php


getMsg.php

".$row["message"]."";
    }

?>

This is the structure of database as well

I tested it on my computer and it works quite well, so if it still does not respond, you have something else goes wrong.

Also, note what happens when you remove the dataDump of the HTTPService.

Tags: Flex

Similar Questions

  • Refresh the report based on the select list item

    Hello world

    Someone has the answer to refresh a report based on an element that I select in a select list? I currently have the item in the list of selection and a report under him I wrote a sql that fills with data. If I choose an article in my select list, I want to change the data in my report. What I have to write separate sqls for each item to be fired or write some type of process. Can someone help me?

    Thank you
    Ryan

    Write directly in the SQL report. Your select list item will be the variable in the SQL.

  • Is it possible to refresh a list box?

    Hello experts,

    Anyone knowing a refreshing area list and conditionally hide/show items in a list?

    I have an Assistant in several steps. Step 2 is optional.

    When a checkbox is disabled in step 1, step 2 should be ignored and the user should immediately go to step 3.

    No problem so far. I can easily check the value of the checkbox and choose another branch after processing the page.

    For the convenience of the user, I would like to show/hide the list item in the wizard progress bar, which is a static, when list box is checked or unchecked.

    I took following steps to try this:

    1. Create item box P7_ADDIT_INFO
    2. Make list conditional element based on the value of the P7_ADDIT_INFO = 1 point
    3. Provide static ID listwizard on the region from the list
    4. Create dynamic action on the CHANGE of P7_ADDIT_INFO with the following JavaScript code:

    Apex. Server.Process (", {pageItems:"#P7_ADDIT_INFO"}, {})

    success: function() {apex.event.trigger ('#listwizard', 'apexrefresh') ;}}

    });

    Unfortunately, this does not work.

    I tried with the method of declarative to submit the question and update the region, but it did not work.

    I also tried with the ONCHANGE event on the text boxes and select lists but no effect no more.

    Is it possible that it is not possible in the APEX to refresh a static list box?

    Refresh a report-, the form - or the region HTML works fine with the same example.

    I created a very basic example of this on apex.oracle.com: https://apex.oracle.com/pls/apex/f?p=24102:7

    Thanks in advance for any help!

    Kind regards

    Bart

    Peeteba wrote:

    Anyone knowing a refreshing area list and conditionally hide/show items in a list?

    Updating of the region in the list is (a) overcomplicating things. and (b) is not possible. The obvious option is to use your condition on the element to control the appearance on other pages and simply to hide/show the step on the page with the checkbox control.

    I have an Assistant in several steps. Step 2 is optional.

    When a checkbox is disabled in step 1, step 2 should be ignored and the user should immediately go to step 3.

    No problem so far. I can easily check the value of the checkbox and choose another branch after processing the page.

    For the convenience of the user, I would like to show/hide the list item in the wizard progress bar, which is a static, when list box is checked or unchecked.

    I took following steps to try this:

    1. Create item box P7_ADDIT_INFO
    2. Make list conditional element based on the value of the P7_ADDIT_INFO = 1 point
    3. Provide static ID listwizard on the region from the list

    4 create a dynamic action on the CHANGE of P7_ADDIT_INFO with a Condition of "equal to" and the value 1, with an action to hide when the event is true and a Show action when it is set to false. Use a jQuery selector to identify the affected item:

    #listwizard.uVerticalProgressList ul li:nth-child(2)

    I created a very basic example of this on apex.oracle.com: https://apex.oracle.com/pls/apex/f?p=24102:7

    Please provide an example. There seems to be a problem with your static region ID and/or the model. I see the following in the source at the beginning of the region from the list:

  • Removal of long list of drop-down list items quickly (ss4)

    I have LiveCycle Designer ES4. I often have a long list of list items in my items from the drop-down list. I want to know if there is a quick way to remove all the items in the list (field tab). I have one at the time a click and remove one at a time. Is there a faster way?

    You can use my macro to create dummy texts.

    Just to empty the text field in the Flex dialog box and click OK, to remove all the values in a drop-down list.

    LiveCycle blog: Lorem Ipsum Generator Makro / / Lorem Ipsum Generator Macro

  • Lov Vs list item

    Hi all

    What is the difference between a LOv element and list. Why use one over the other?

    Hello!
    There are some important things on her list items:
    If you questioned records in your block, you cannot clear the list and refresh it.
    If you query the records in your block and there are values in the database column
    are not in the list, the records are simply deleted until you specify a 'another value '.
    for your list item.

    If you have static values for the choice of the user, use the items in the list.
    If you have a wide range of values which must be more flexible, use lovs.

    For example: create an invoice, use a lov to the name of the customer, if
    the customer does not exist, create a new customer and redisplay the lov.
    For the shipping type, use a list item.
    Concerning
    Stauder

  • Problem with the mobile Flex list control

    Hello world.

    I have a problem with the list control in Flex mobile.  I need create list in "Flex mobile" and I need that list items must have following structure. a single image, text and then another picture. How do I do this?

    Concerning

    Include a component with a custom converter.

    See the documentation for Flex: http://help.adobe.com/en_US/flex/using/WS03d33b8076db57b9-23c04461124bbeca597-8000.html for more details.

  • the page is rendered and loaded questions of list item change

    Hi all

    I have 2 questions, I'll try to put it as clear as possible. The link and log in info on the bottom.

    1. in what order is the rendered page fire? In other words, I have a report to Page 2 (Payroll Summary) and in this report, I select and where clause. The where the info from the article comes from a list item. When you view the report it shows nothing, so I guess that because the element is not filled in and yet, this is why the report does not. Not sure... so if someone can clarify that for me, it would be great.

    2. when I change a list item (eg. Payroll between 2010 and 2009 year), how can I refresh the payoll report that uses the year of payroll as a parameter? is it possible to launch the summary report on the Payroll when the year changes? If so, how?

    My apex page is

    http://Apex.Oracle.com/pls/Apex/f?p=31754:2:678019909905630:no:

    It is application of dashboard.

    Workspace Laba
    Username [email protected]
    Password edumet

    Once the connection to the application info is

    E-mail [email protected]
    password Laba

    Thank you
    Laba

    Emeric,

    When the page is sent after the selection value is changed, the prior to execution of the header calculations. I added a condition on the calculation, so that it only works when the value of the element is set to zero.

    Thank you
    Machaan

  • List item converter

    How would I go about creating a list item converter, for example, with a small image with the original text? Just a small sample would be great, because I don't know how to start to code such a thing.

    Thank you!

    This tutorial shows how to do exactly that. It's the one that I used to figure out how to use ItemRenderers:
    http://www.ActionScript.org/resources/articles/548/1/Flex-20-ItemRenderers/Page1.html

  • 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.

  • 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();
    }
    
  • Custom list item changes when you click

    I'm having a strange problem.

    When my list of messages is filled first, she checks a property in the json data to see if the message is 'read' or 'unread '. If it is "no read", it will be a different color than those who are already "read" to indicate to the user.

    It works very well, however I added an action context to the list, and when this action is triggered, I'm changing the message "unread". If the color of the list item to change. This works.

    However, after I changed the color of a single item in the listwhen I do scroll down and down, many elements change color. I think it has to do with the rendering of the list of recycling.

    This behavior does not occur after that list first initializes. Regardless of the colors have been queued to initialize their place. Only after that I have an amendment to one of the elements in the list, things go crazy when I scroll. I hope I'm being clear.

    How can I stop this from happening?  This is the code that changes the color of the label in my custom list item.

     listItemComponents: [
                                ListItemComponent {
                                    MessageListItem {
                                        id: messagesListItem
                                        contextActions: ActionSet {
                                            ActionItem {
                                                title: "Mark Unread"
                                                onTriggered: {
                                                    if (messagesListItem.isNew == false) {
                                                        var selectedItem = ListItemData;
                                                        messagesListItem.isNew = true; //property of list item is changed to unread
                                                    }
                                                }
                                            }
                                        }
    

    And inside the MessageListItem.qml

    property bool isNew: ListItemData.data.new
    
       onIsNewChanged: {
            if (isNew == true) {
                subjectLabel.textStyle.color = Color.create("#FF4500");
            } else {
                subjectLabel.textStyle.color = Color.create("#000000");
            }
        }
    

    Please let me know if you have any questions, any help or suggestion is appreciated. Thank you!

    Hello!

    I think that it doesn't because you are not changing 'new' dataModel element variable. In addition, assigning directly control isNew breaks property DataModel is bound to it.

    It should work if you change the dataModel instead.

    An important point to note, however, that it is not possible to change the individual variables of dataModel point. You need to replace the entire item. The code example for GroupDataModel: (not tested, so may require tweaks, tell me please if you need help in getting this work):

    onTriggered: {
      var selectedItem = ListItemData  // get a copy of dataModel's item
      selectedItem.new = !selectedItem.new  // modify it's property
      messagesListItem.ListItem.view.dataModel.updateItem(indexPath, selectedItem) // update the model
    }
    

    For ArrayDataModel, the function is named differently.

    In addition, this line seems suspicious:

    property bool isNew: ListItemData.data.new
    

    Probably, it should be replaced by this one:

    property bool isNew: ListItemData.new
    
  • TextStyle for description &amp; standard list item status

    Hello

    Is it possible to have a textsyle custom (different fonts, size, color) to use in the standard list item. Currently, he has a gray color, and I have a grey'ish of background, so it does not work properly.

    I'm more interesting by changing the color of the part of the State.

    I used javascript to includetags, but tags is not the kickoff, instead of this, I see"... "as a text.

    Thank you
    S.

    I found the solution, so the key is to use textFormat as 'TextFormat.html' and then usetags in the text.

                            StandardListItem {
                                title: ListItemData.stockName
                                description: listS1Container.description()
                                status: listS1Container.status()
                                textFormat: TextFormat.Html
                            }
    

    in the container, I have a function, for example the status:

                            function status(){
                                return "TEST "+ListItemData.name + ";
                            }
    
  • Color change to display list items

    Is it also possible to change the text color of a list item based on an XML file?

    Brilliant. I also realized that all this should be in a CustomListItem. Thank you very much, Zmey

  • Refreshing a list of qnx

    I display a qnx.ui.listClasses.List. When the user enters a new line in another form I want to refresh the list to display new data. What is the recommended strategy? Thank you

    Add the data to the data provider object.  That he should automatically refresh.

    var mylist.dataProvider.addItem ({label: "new element"});

  • List items are overlapped on popup screen

    Hi all

    I'm developing an application in which i use a popup screen and I have an ist of all data on the device (memory a sd card in the device). I show these data in a list and with a few images and checkboxes. My problem is that when I scroll or scroll through list items upward, are overlapped and yet when I scrolling to a particular element, only this element comes to its normal state.

    And this behavior is only broadcast on the devoce but when I run the same code on Simulator it works very well without any problems!

    Why this is happening? Any idea?

    Help, please!

    Thank you..

    Thnx for your help...

    My problem is solved...

    I was doing loads of operations under oaint method...

    Thank you very much...

Maybe you are looking for