If Bindable property is assigned to component itself ItemRendererSimpleBinding 
throws exception - example of such binding can be find: 
\examples\flexjs\MDLExample\src\main\flex\itemRenderers\CustomMenuItemRenderer.mxml


Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/59223444
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/59223444
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/59223444

Branch: refs/heads/feature/fontawesome
Commit: 59223444ed48d4b15d996919ba5925613db06f03
Parents: 6642ca7
Author: piotrz <[email protected]>
Authored: Tue Jan 3 14:09:40 2017 +0100
Committer: piotrz <[email protected]>
Committed: Tue Jan 3 14:09:40 2017 +0100

----------------------------------------------------------------------
 .../org/apache/flex/binding/ItemRendererSimpleBinding.as    | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/59223444/frameworks/projects/Binding/src/main/flex/org/apache/flex/binding/ItemRendererSimpleBinding.as
----------------------------------------------------------------------
diff --git 
a/frameworks/projects/Binding/src/main/flex/org/apache/flex/binding/ItemRendererSimpleBinding.as
 
b/frameworks/projects/Binding/src/main/flex/org/apache/flex/binding/ItemRendererSimpleBinding.as
index 5354a8c..889a218 100644
--- 
a/frameworks/projects/Binding/src/main/flex/org/apache/flex/binding/ItemRendererSimpleBinding.as
+++ 
b/frameworks/projects/Binding/src/main/flex/org/apache/flex/binding/ItemRendererSimpleBinding.as
@@ -144,7 +144,14 @@ public class ItemRendererSimpleBinding implements IBead, 
IDocument
 
        private function dataChangeHandler(event:Event):void
        {
-               document[destinationID][destinationPropertyName] = 
document.data[sourcePropertyName];
+               if (destinationID == "this")
+               {
+                       document[destinationPropertyName] = 
document.data[sourcePropertyName];
+               }
+               else
+        {
+            document[destinationID][destinationPropertyName] = 
document.data[sourcePropertyName];
+        }
        }
 
 }

Reply via email to