Flex 모바일 응용 프로그램 (또는 Flex 4 응용 프로그램)에서는 다른 두 필드의 내용에 따라 버튼을 활성화/비활성화 할 수 있습니까? - 아마 앰퍼샌드 특수 문자입니다 만, (이 문제를 해결하는 방법을 의미 The entity name must immediately follow the '&' in the entity reference.
: 내 아주 간단한 테스트 아래의 코드와 코드의 문제를 붙여 넣기하고2 개의 TextInput 필드가 비어 있지 않은 경우에만 버튼 사용 가능 - 코드 및 스크린 샷 첨부
는 플래시 빌더 4.7에서 구문 오류입니다 아마 자주) 문제?
TestApp.mxml :
<?xml version="1.0" encoding="utf-8"?>
<s:ViewNavigatorApplication
xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
firstView="views.Home"
applicationDPI="160">
</s:ViewNavigatorApplication>
전망/Home.mxml : 당신이 MXML에서 CDATA의 외부를 쓸 때 당신은 &&
와 &&
를 교체해야
<?xml version="1.0" encoding="utf-8"?>
<s:View xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
title="How to enable Login button?">
<s:layout>
<s:VerticalLayout paddingTop="8"
horizontalAlign="center" gap="8" />
</s:layout>
<s:Label text="Username:" />
<s:TextInput id="_username" />
<s:Label text="Password:" />
<s:TextInput id="_password" />
<s:Button id="_login"
label="Login"
enabled="{_username.text.length > 0 && _password.text.length > 0}" />
</s:View>