list item using xml from a django view


I'm with django to deliver xml from a postgres database files. I have the connection using a HTTPService. I'm not able to get the XML to provide data to a list item.

The mxml application is below:

Quote:
<? XML version = "1.0" encoding = "utf-8"? >
< mx:Application
' xmlns:MX =' http://www.adobe.com/2006/mxml '
layout = "absolute" >

< mx:Script >
<! [CDATA]
Import mx.events.MenuEvent;
Import mx.collections.ArrayCollection;
Import mx.collections.XMLListCollection;
Import mx.rpc.events.ResultEvent;
Import mx.controls.Alert;


[Bindable]
private var emails: XMLListCollection = new XMLListCollection();
[Bindable]
private var units: collection ArrayCollection = new ArrayCollection();

private void handleLoginClicked(event:MouseEvent):void {}
svcAccountLogin.send ({username: "admin", password: "admin"});
}

private void handleLoginResult(event:ResultEvent):void {}

trace (Event);
trace (Event.Result);
email = Event.Result.allMails.mail;
Units = Event.Result.allUnits.Unit;

}
[]] >
< / mx:Script >

< mx:HTTPService
ID = "svcAccountLogin".
"URL =" http://192.168.1.100:8080/accounts/login /? = / maillog following / "
method = "POST".
resultFormat = "xml".
result = "handleLoginResult (Event)" / >


< mx:VBox = "76" x y = "62" height = "100%" id = "loginUserPass" label = "Enter Username, password here" >

< mx:Button id = "submitLoginBtn" label = "Login" click = "handleLoginClicked (event)" / >

< mx:List id = "mailId".
number of lines = "1".
dataProvider = "{mails}.
labelField = "mailFrom" >

< / mx:List >
< / mx:VBox >

< / mx:Application >

Tags: Flex

Similar Questions

  • How to display the list item values both from 2 different tables?

    Hello world.

    I have a problem for the display of the data.

    There are 2 tables in the database.

    Table-1 has lc_value, lc_no, lc_dt, and vendor_code columns.

    Table-2 has vendor_code, $vendor_name & vendor_address.

    I created the form where I display data in list item 30 (tabular presentation - 30 records displayed).

    I need to display all values automatically at the same time in the form just by clicking on "Enter_Query" and "Execute_Query".

    It worked when the form had fields in a table in a single table.

    I created fields in a table for tables; then created the relationship between the tables by using the join (vendor_code).

    But when I run the form, click on "Enter_Query" and "Execute_Query", its does not work.

    Oracle9i Enterprise Edition Release 9.2.0.1.0 - Production.

    How can I do this?

    Help me.

    Thank you.

    Dear Bruno,

    Each provider code is to have a folder, then

    Why keep two tables?

    Why you want to update both the table at the same time?

    Master / detail means,.

    a master record depends on several detail records.

    Please, understand and try to build your form with single table.

    If you have already created 2 tables, then merge these into a single table.

    Or other wise keep table_1 as a database block and to vend_name as a data field (element of database in the palette of the property is set to 'no').

    Then go to the trigger of table_1 block post_query and write the following:

    Select vend_name in: vend_name from vendor_mst where vend_cd =: lc_vend_cd;

    In doing the above, the form will look as you wish but the change on the vend_name not to be saved because that is the point of no database.

    Other than vend_name all fields in table_1 will be recorded.

    Hope this will help.

    Post edited by: Priyasagi

  • All items not protected from the Web Viewer

    Hello together,

    We use the Web Viewer for marketing stuff and send us an E-Mail with the link to the articles very often. The problem is: there are about 15 unprotected articles, only a few are displayed in the browser. Once the message appears: "Please buy this question!" - Although the article is not protected. Is it possible to display all items not covered in the Web Viewer?

    Thank you

    You can set a lower limit of Paywall threshold in your account application in respect of the Administration of the accounts. You can increase the Paywall threshold to allow all items not covered in the web viewer.

    You can also check this link for more information: http://www.adobe.com/devnet/digitalpublishingsuite/articles/integrated-social-sharing-with-num digital edition - suite.html

  • switching from reports using list item - missing data on initialization

    Hello

    I have two interactive reports (one with view and secondly with line of business)... I greeted my users to pass from prod/LOB (using the list item)... I use LOB view as default view

    My problem is that when the user connects to the view BUSINESS application report is displayed by default (of your choice), but contains no data (the message: no data found) until I have switch to view (via the list item) and then switch to view return LOB... Not sure what is the cause


    I've stored sample on APEX. ORACLE.COM for review and comment

    Here are the credentials:


    Please note that the form is on page 2

    Thanks in advance

    Published by: qwe12654 on April 21, 2011 15:26

    Hey Tal,

    Try the page now

    When you base reports on page elements, you must ensure that these elements have values already stored in the session. I added two calculations to your page that define the year and product/lob select list values if they are null.

    Andy

  • 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();
    }
    
  • Select multiple items using a selection list?

    Hi all

    In my application, I have a HTML area with two elements of the selection list. According to the first value of the selection list, the second selection list will fill up.

    Now I want to show a report based on the second select value list, but I want to select several values in the second selection list. For this, I just activated the multiple selection option in the selection list item.

    But when I tried to implement this, the error occurs.

    Select multiple items using a selection list? If this is the case, how can I assign these values in the selection list element onchange attribute.

    Thank you
    David...

    A further possible solution to that above with the function of pipeline is to simply use Instr.

    Note: This option should be used if the amount of data is small or already filtered by other predicates.

    SELECT display_value, return_value
      from xxx
     where INSTR(':'||:P1_MASTER_MULTI_SELECTLIST||':', ':'||parent_value||':') > 0
     order by display_value
    

    BTW, if you use the new attribute "Cascading LOV Parent éléments" in the LOV section and set it to your parent element (in my example P1_MASTER_MULTI_SELECTLIST), the agenda of the child page is automatically updated if the master multi selection list is changed.

    Concerning
    Patrick

  • To remove data XML from XML using REGEXP_REPLACE tags

    Hello

    I try to use the SQL REGEXP_REPLACE function on a piece of XML, to remove the actual XML data from the weather. My ultimate goal is to end up with a list separated by commas to names of XML elements. In the first stage, I want to just pull all of the actual data.

    I tested the following query, and it initially appeared to work:
    SELECT REGEXP_REPLACE('&gt;THIS IS A TEST&lt;', 
                          '&gt;([[:alnum:]]\s|\S)*&lt;',
                          '&gt;&lt;' ) AS test_result
      FROM dual;
    Unfortunately, when I applied it to a full XML string, it did not. Here is the query to test that I used:
    SELECT REGEXP_REPLACE('&lt;ROW&gt;&lt;TEST_ELEMENT1&gt;123&lt;/TEST_ELEMENT1&gt;&lt;TEST_ELEMENT2&gt;THIS IS A TEST!&lt;/TEST_ELEMENT2&gt;&lt;/ROW&gt;',
                          '&gt;([[:alnum:]]\s|\S)*&lt;',
                          '&gt;&lt;') AS test_result
      FROM dual;
    I found myself with the following result:

    * & lt; LINE & gt; & lt; / LINE & gt; *

    What I was trying to a:

    * & lt; LINE & gt; & lt; TEST_ELEMENT1 & gt; & lt; / TEST_ELEMENT1 & gt; & lt; TEST_ELEMENT2 & gt; & lt; / TEST_ELEMENT2 & gt; & lt; / LINE & gt; *

    If you are reading this and you are a Posix regular expression guru, could you let me know exactly where I am going wrong? Regular expressions are not my strong point, but I would better go home.

    Hello

    For your final requirement, the 'commas list names of XML elements', what using XQuery with something like:

    SELECT xmlquery(
      'string-join( for $i in $d//*
                    return local-name($i), "," )'
      passing xmltype('123THIS IS A TEST!') as "d"
      returning content
    ).getStringVal()
    FROM dual;
    
  • Generate items in a list in an XML file

    If I have a xml file called temp.xml as
    < object id = "Item #1" data = 'Something1' >
    < object id = "Item #2" data = 'Something2' >
    < object id = "Item #3" data = "Something3" >
    < object id = "Item #4" data = "Something4" >

    and in my flex application, I have a < mx:List... / > what is the best way to fill the list items in the xml file?
    Thank you

    I guess I wasn't too clear, but I found the answer to what I was looking for.

    In my list, I can set the dataProvider of the ListItems array and call my loadmyXML() method


    Import mx.collections.ArrayCollection;

    public var listItems:ArrayCollection = new ArrayCollection();

    public function loadmyXML (): void {}
    var loader: URLLoader = new URLLoader();
    loader.addEventListener (Event.COMPLETE, handleComplete);
    Loader.Load (new URLRequest ("some.xml"));
    }

    private void handleComplete(event:Event):void {}
    try {}
    var toolsXML:XML = new XML (event.target.data);
    This will just display the xml code in the console
    trace (toolsXML);
    for each (var items: XML in toolsXML.elements ())
    {
    Add each element from the xml code in the table
    var something: Object = new Object();
    Something.label = in stock;
    listItems.addItem (something);
    }
    }
    catch(e:TypeError)
    {
    trace ("cannot parse text for XML");
    trace (e.message);
    }
    }
    ]]>

  • Using Windows Live Mail. Screen reads, "some items can be hidden because a view is applied. How to access the hidden objects?

    Using Windows Live Mail.  My incoming screen is empty.  There is a message stating: "some items can be hidden because a view is applied.  How can I check to see if there are objects hidden and, if so, what they are?

    It depends on what version of the program that you use, but the key word is seen. In all versions, there are display orders; in 2009, WLMail, they are in the menu display . WLMail 2011, they tape everything what they own. In all versions, press Alt + V to display the available commands. Search, display or hide the options (to hide messages you have already read, for example) or a filter (for filtering messages read, for example).

    Windows Live Mail has its own support at the Windows Live Solution Centerforums. Please address any other question you may have on one of the forums on the right side of this page. You are probably asked to give your version of WLMail and Windows so that the answer may be more accurate.

    • In WLMail to find your version of the software, a press on ALT - H. If it doesn't show you the version and the build number, press on escape to two times, and then Alt - F B.
    • To find your version of Windows, type winver in the start search box and press enter.

    Noel

  • Creating XML file using data from database table

    I have to create an xml file by using the data in the table of multiples. The problem that I face is data are huge it's millions, so I was wondering is it possible efective for the creation of an XML of this type.

    It would be great if you can suggest an approach to achieve my requirement.

    Thank you
    -Vinod

    An example of the forum: Re: how to generate the XML from the database table

    Published by: Marco Gralike on 18 October 2012 21:41

  • the use in the operator not to take value of list item

    Hi gurus,
    I have four types of employees
    such as 'C' for consultants, the from ' for the staffs, 'W' for workers, ('E', the of ',' W') for all types of employees.
    I write four queries to show four types of employees.
    can it is possible in a single query.

    Please guide me...

    I wrote this in oracle forms
    I took a list item for the workers, I took 'W', for the staffs, I took the of ' consultants, I took 'C' and for all I took 'A '.
    my column name is emp_type in (: block.list_item)
    but it does not have the value of the list item when the value is emp_type, in('C') etc etc...
    same for workers, the staffs.
    When he is 'A' it will be emp_type in ('E', the of ',' W')

    Please answer...

    where did you put that "emp_type in...". "- thing? In the WHERE clause of the blocks? Also, check the value of the SYSTEM. LAST_QUERY after the query has been run.

    Published by: Andreas Weiden on 07.07.2011 19:52

  • How to deletions has selected list item from a list item.

    How delete a list item selected in a list item.

    My question that I should write to list_index so that it indicates the selected list item

    DELETE_LIST_ELEMENT (Nom_liste, list_index);

    -----
    Form of Oracle 10g

    Hello

    The trigger when-list-changed fires whenever the value has been changed.
    You get this value/index with the following:

    DECLARE
       LC$Liste  Varchar2(61) := :system.cursor_item ;
       LC$Valeur Varchar2(30) := Name_In( LC$Liste ) ;
       LN$Nbre   Pls_integer ;
    BEGIN
    
       LN$Nbre := Get_List_Element_Count( LC$Liste ) ;
    
       For i IN 1 .. LN$Nbre Loop
          If Get_List_Element_Value( LC$Liste, i ) = LC$Valeur Then
             -- you get the selected value, and index there --
             :BLOC2.LABEL := Get_List_Element_Label( LC$Liste, i ) ;
             Exit ;
          End if ;
       End loop ;
    
    END;
    

    François

  • analysis using XML dom

    Hi all

    very new development for mobile am my doubts may be stupid to you all,.

    but I need your help as am new to this platform.

    My requirement is, I need to parse a xml form url DOM parser and

    I need to analyze the sectionname only an xml file and display them in a

    ListField.when I select one of the item listfield it must navigate

    next screen and parse and xml again and list the contents of the sectionname.

    class VVFApplication extends UiApplication{      MainScreen _screen= new MainScreen();      String _node,_element;      Connection _connectionthread;
    
    public static void main(String arg[]){     VVFApplication application = new VVFApplication();     application.enterEventDispatcher(); } 
    
    public VVFApplication() {   
    
        _screen.setTitle("Vishwak Video Framework");    _screen.add(new RichTextField("LOADING"));     _screen.add(new SeparatorField());      pushScreen(_screen);     _connectionthread = new Connection();     _connectionthread.start();} 
    
    public void updateField(String node, String element){ 
    
         String title="SectionName";     _screen.add(new RichTextField("*"+element));    // _screen.add(_listElements.addElement("*"+element) );     if(node.equals(title)){     _screen.add(new SeparatorField()); } } 
    
    private class Connection extends Thread{     public Connection()    {        super();     } 
    
    public void run()    { 
    
         Document doc;      StreamConnection conn;      try{      conn=(StreamConnection)Connector.open;       DocumentBuilderFactory docBuilderFactory = DocumentBuilderFactory. newInstance();      DocumentBuilder docBuilder= docBuilderFactory.newDocumentBuilder();       docBuilder.isValidating();      doc = docBuilder.parse(conn.openInputStream());      doc.getDocumentElement ().normalize ();      NodeList list=doc.getElementsByTagName("SectionName");     _node=new String();     _element = new String();      Object obj = Application.getEventLock();     for (int i=0;i
    

    now, I need to have a selectable listfield, who displays the sectionname in list.and wen I select the list item, it must navigate to the next screen to display its content.

    can anyone suggest me some ideas.thanks in advance

    If the screen is blank, then there not all fields or fields not display anything. Show us the code for how you build the screen, how do fill you the listfield and anything else that might be relevant. More (relevant) information, it is more likely that you will receive assistance.

    Did you read the documentation for ListField? In addition, RIM has several articles on listfield in the category of fields of knowledge base. There is a tutorial at http://developerlife.com/tutorials/?p=898, and a search on the web for "blackberry listfield" will many examples.

    You must extract the DOM, the information that you want to view and add to the (usually an array or a vector) data structure used by a ListFieldCallback registered with the ListField. If you use the ObjectListField, it acts as its own ListFieldCallback and attracts each element as a line of text using ToString. Otherwise, you must write your own ListFieldCallback, which is pretty easy, unless you want fancy layout for each line.

  • Help with dynamic action and the selection list item

    G ' Day Apex gurus.

    I have problems trying to achieve to trigger the Help window from an element automatically select. A Help window is triggered when it is clicked on the label of an item, but my customer wants to be triguered automatically as soon as the user clicks to view the options in the select list.

    I think I should be able to do with dynamic actions but I can't function.

    I know when someone clicks on the label of the item selection list trigger this JavaScript

    JavaScript:popupFieldHelp('277938589795252851','1545903379570909')

    So I want to trigger the javascript also when the user click on the item selection list and pull down the options and for that I think that the dynamic action is the way to go, but I can't do things.

    That's what I have to do:

    I created a dynamic option as follows:

    Name: test
    Sequence: 30
    Even: click
    Selection type: product (s)
    Article (s): P1_RATING <-a selection list item
    Condtion: - no requirement.

    Real Actions
    Sequence: 10
    Action: Run the JavaScript Code
    Fires when the result of the event is: true
    Fire on loading the page: checked
    Code: javascript:popupFieldHelp('277938589795252851','1545903379570909')

    Thank you anyone who can tell me what I'm doing wrong here or bring a solution to my problem to trigger the Help window from an element automatically select.

    Kind regards
    Carlos

    Hi Carlos,

    I've set up a test case of exactly in the same way and it worked fine for me. I've created a page element called P1_DA_DEMO and added some values of the static selection list, then added a help text. I used the settings are lower, I suggest you try again, but also make sure that you have no other Javascript errors on the page. Use a tool like firebug to check.

    Name: Action Dynamics demo
    Sequence: 10
    Even: click
    Selection type: product (s)
    Product (s): P1_DA_DEMO<- a="" selection="" list="">
    Condtion: - no requirement.

    Real Actions
    Sequence: 10
    Action: Run the JavaScript Code
    Fires when the result of the event is: true
    Fire on loading the page: unchecked
    Code: javascript:popupFieldHelp('277938589795252851','1545903379570909')

    Scope of the event set a Bind s.

    Thank you

    Paul

  • inputComboboxListOfValues - add list items

    Hello everyone,

    Hello

    I had a need as follows

    in oracle 10g forms use it like that.

    List items Value of list item
    Excel - SPREADSHEET
    Word - RTF
    PDF - PDF
    Browser - HTMLCSS
    CSS - DELIMITEDDATA
    XML - XML

    but I heard so much like this also in the adf. but I don't know how to do it programmatically in the adf


    -jdev 11.1.1.5.0
    Business - ADF components.

    Hello

    You can

    (i) drag a component selectOneChoice in a view, and then in the Edit dialog box define a static list
    (II) create a static ViewObject (if you use BC ADF), and then create the static values

    Frank

Maybe you are looking for

  • Download does not start

    I tried to download Simple sticky notes on my computer. I use Windows 8. I added download.com sites allowed in the Security tab. When I click on the arrow down to retrieve the file downloaded, I see there, but it does not open. I downloaded the file

  • For Camileo H10 SD card

    Hi all! I just got a * Toshiba Camileo H10 * and would like to know is it would take a 32 Gb SD Card. If not, what is the maximum I can develop?Also, is there any particular specification, I need to keep in mind about the SD card? Thanks in advance f

  • Satellite A100-206 supervisor password problem

    Hello We have a Satellite A100-206 at the office. A colleague trying to protect the laptop set the user password in the bios.I do not exactly know what she does but at startup is asked for a password. Then she ask me to remove the password so I typed

  • Safari address bar does not work

    Hello This morning I try to type the text in the address bar of safari, but I can't type, when I press on enter overlaps with the previous text. How to restore safari? Thank you Software version: OS X El Capitan 10.11.3

  • Update error code 80246008 windows has encountered an unknown error

    IV recently corrected my windows update service, but I'm unable to install the important updates because I get an error code 80246008 windows has encountered an unknown error. I don't know what to do, ive tried microsoft solve this problem, iv also b