小编Get*_*ubt的帖子

Flex:如何将S:列表中的Sqlist查询绑定到S:Textarea

在flex builder 4.6中,我试图从am sql查询绑定数据,在一个<s:List>项目渲染器中显示<s:Textarea>

我的守则如下:

<s:List id="listapagar" x="304" y="276" width="330" height="42" borderVisible="false"
        color="#FF0000" dataProvider="{dataProvider}" enabled="false" fontSize="22"
        fontStyle="italic" fontWeight="bold" labelField="nome" textAlign="center"
        textDecoration="underline">
    <s:itemRenderer>
        <fx:Component>
            <s:ItemRenderer>
            <s:TextArea id="apagar" width="330" height="42" text="R$ {data.valorapagar}" />      
            </s:ItemRenderer>
        </fx:Component>
    </s:itemRenderer>
</s:List>
Run Code Online (Sandbox Code Playgroud)

在这里,我的sql显示通过<s:list>:

protected function buttonX():void
        {
            var sqlConnection:SQLConnection = new SQLConnection();
            sqlConnection.open(File.applicationDirectory.resolvePath("testeDb.sqlite"));

            var stmt:SQLStatement = new SQLStatement();
            stmt.sqlConnection = sqlConnection;
            stmt.text = "SELECT * FROM comandatual order by numerodatransacao desc limit 1 ";
            stmt.execute();

            dataProvider = new ArrayCollection(stmt.getResult().data);
        }
Run Code Online (Sandbox Code Playgroud)

在它之后,我试图将结果显示在s:TextArea id …

apache-flex sqlite flexbuilder actionscript flex4.5

5
推荐指数
1
解决办法
515
查看次数

标签 统计

actionscript ×1

apache-flex ×1

flex4.5 ×1

flexbuilder ×1

sqlite ×1