Hello Community!
I'm having issues with the property "editable" of textArea control.
I have a component: OrderView.mxml and it's associated data class OrderViewData.as.
Orderview.mxml is inside a viewStack to enable navigation from a component to another. In this particular case, OrderView.mxml is called by another component: SearchResult.mxml. I can thus navigate from SearchResult.mxml to OrderView.mxml, and back to SearchResult.mxml...
OrderView.mxml has textArea and textInput control, that have to be editable or nonEditable depending on the property var isEditable:Boolean from OrderViewData.as.
When the application is launched, isEditable = true. So, all textInput and textArea controls are editable the first time the user gets to OrderView.mxml. When the user clicks on the button order from OrderView.mxml, isEditable = false. When the user goes back to SearchResult.mxml, isEditable = true (again) --> Until here, everything works fine.
The thing is: when the user goes back to OrderView.mxml for the second time (and beyond), even if the property isEditable = true, textArea controls are still non editable... But the textInput controls are editable!
Here is some code for your comprehension: OrderView.mxml
<mx:Canvas xmlns:mx="http://www.adobe.com/2006/mxml"
backgroundColor="#F3EDEC">
<mx:TextArea
id="contentTA"
text="{OrderViewData.instance.contentTA}"
enabled="{OrderViewData.instance.isEnabled}"
width="100%" height="51"
maxChars="18" styleName="ORTextInput"
focusIn="if(OrderViewData.instance.isEditable) contentTA.setSelection(0, contentTA.length)"
editable="{OrderViewData.instance.isEditable}"/>
<mx:TextInput id="contentTI"
text="{OrderViewData.instance.contentTI}"
width="40" height="18" maxChars="4"
styleName="ORTextInput"
change="contentTI_change()"
focusIn="if(OrderViewData.instance.isEditable) contentTI.setSelection(0, contentTI.length)"
editable="{OrderViewData.instance.isEditable}"/>
</mx:Canvas>
Am I missing something? Thanks for any help you can provide.
Regards. BS_C3