为了简单起见,假设我有两个Flex MXML页面。
form.mxml
button.mxml
如果form.mxml页面具有以下代码,则应该可以正常工作:
<custom:SelectView dSource="{_thedata}" id="form" visible="false">
</custom:SelectView>
<mx:LinkButton label="Show" id="lbShow" click="form.visible=true;>
<mx:LinkButton label="Show" id="lbHide" click="form.visible=false;>
但是如果代码像这样:
<custom:SelectView dSource="{_thedata}" id="form" visible="false">
</custom:SelectView>
button.mxml
<mx:LinkButton label="Show" id="lbShow" click="form.visible=true;>
<mx:LinkButton label="Show" id="lbHide" click="form.visible=false;>
如何从button.mxml拨打电话以更改form.mxml
---- 更多细节 ---
我的页面实际上是这样的:其中query:AdvancedSearchFields基本上将flex表单包含在页面中,我希望在搜索完成后显示/隐藏下面的自定义视图。
<query:AdvancedSearchFields searchType="projects" searchCategory="advanced" visible="true" id="AdvancedSearch" />
<custom:SelectView dSource="{_searchResults}" id="sv" visible="false">