如何为Flex Mobile Application中的下拉列表设置单击,更改和选择属性

时间:2014-03-27 11:41:19

标签: flex flash-builder

我尝试了不同的方法,但无法获得解决方案。如果有人可以帮我编码。我应该将从Web服务获取的数据绑定到下拉列表,我已经完成但我无法单击或从下拉列表中选择一个值,它会在我单击它时立即关闭。请帮助我是Flex新手。

谢谢。

MXML组件代码:

<s:DropDownList   id="ddlBranch"    
                                       x="257" y="475"
                   width="63%" height="60"
                   fontFamily="Calibri" fontSize="24"
                  creationComplete="ddlBranch_creationCompleteHandler(event)"
                  prompt="{ddlBranch.selectedItem}" 
                  requireSelection="true"
                  selectionColor="#7ab342">                 
        <s:AsyncListView list="{getBranchResult.lastResult}" />                 
</s:DropDownList>

网络服务电话:                  在这里我从数据库获得两个列值即。 BranchName和BranchCode,我必须将Branch Name绑定到ddlBranch,并且必须使用BranchCode仅获取具有我在此DDL中选择的BranchCode的相关区域。

protected function ddlBranch_creationCompleteHandler(event:FlexEvent):void
{
    getBranchResult.token = Service.getBranch();
}

这是我将数据绑定到下拉列表的代码。请你帮我把数据绑定到另一个下拉列表,根据从上面的下拉列表中获得的值。另一个DDL是

MXML代码:

                    <s:DropDownList id="ddlZone"
                            x="257" y="546" 
                            width="63%" height="60"
                            fontFamily="Calibri" fontSize="24"
                            creationComplete="ddlZone_creationCompleteHandler(event)"
                            prompt="{ddlZone.selectedItem}"
                            requireSelection="true"
                            selectionColor="#7ab342">                   
                <s:AsyncListView list="{getZoneResult.lastResult}" />                   
        </s:DropDownList>

WEB服务电话:

这里我只需要绑定我在上面选择的BranchName下的区域。我们必须使用BranchCode绑定它,我们在上面的ddlBranch方法中得到它。

                    protected function ddlZone_creationCompleteHandler(event:FlexEvent):void
        {
            getZoneResult.token = Service.getZone();
        }

0 个答案:

没有答案
相关问题