SomeView.mxml
에 사용 된 모든 값을 보유하는 PresentationModel
AS 클래스가 있습니다. 모델의 전체 클래스는 바인딩 가능하며 뷰의 모델 속성도 바인딩 할 수 있습니다. 그러나, 나는 PropertyInjector
태그를 사용하여보기로 모델을 주입 드릴 수 없습니다 : 플렉스 데이터 바인딩과 나에게 손을 줄 메이트와OjbectBuilder에서 만든 객체를 볼 속성으로 입력하십시오.
- INFO: Data binding will not be able to detect assignments to model
겠습니까 사람을 익숙하게? 고마워요!
MainEventMap.mxml
<EventHandlers type="{FlexEvent.INITIALIZE}">
<ObjectBuilder generator="{PresentationModel}" registerTarget="true">
<Properties dispatcher="{scope.dispatcher}"/>
</ObjectBuilder>
</EventHandlers>
<Injectors target="{SomeView}" debug="true">
<PropertyInjector targetKey="model" source="{PresentationModel}" />
</Injectors>
발췌문 SomeView.mxml
<mx:Canvas xmlns:mx="http://www.adobe.com/2006/mxml" width="518" height="562" >
<mx:Script>
<![CDATA[
//...... all the imports
[Bindable]
public var model:OSGiBrokerConsoleModel;
// ......other variables and functions
]]>
</mx:Script>
// ..... actual view components
</mx:Canvas>
나머지 PresentationModel은 어떤 모습입니까? – Stiggler