You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pivot.apache.org by "Todd Volkert (JIRA)" <ji...@apache.org> on 2010/08/12 19:42:17 UTC
[jira] Created: (PIVOT-596) BXMLSerializer should call bind() on
superclasses when appropriate
BXMLSerializer should call bind() on superclasses when appropriate
------------------------------------------------------------------
Key: PIVOT-596
URL: https://issues.apache.org/jira/browse/PIVOT-596
Project: Pivot
Issue Type: Improvement
Components: core-beans
Reporter: Todd Volkert
Assignee: Todd Volkert
Priority: Minor
Fix For: 2.0
Scenario:
public class A {
}
public class B extends A implements Bindable {
@BXML Foo foo;
@Override
public void initialize(...) {
System.out.println(foo.getClass().getSimpleName());
}
}
public class C extends B {
@BXML Bar bar;
@Override
public void initialize(...) {
super.initialize();
System.out.println(bar.getClass().getSimpleName());
}
}
Now, in test.bxml, you have:
<C/>
You expect the following output:
"Foo
Bar"
And yet we only bind the object to class C, meaning you instead will get a NullPointerException trying to de-reference 'foo'.
We should bind to all classes that implement Bindable.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Resolved: (PIVOT-596) BXMLSerializer should call bind() on
superclasses when appropriate
Posted by "Todd Volkert (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/PIVOT-596?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Todd Volkert resolved PIVOT-596.
--------------------------------
Resolution: Fixed
> BXMLSerializer should call bind() on superclasses when appropriate
> ------------------------------------------------------------------
>
> Key: PIVOT-596
> URL: https://issues.apache.org/jira/browse/PIVOT-596
> Project: Pivot
> Issue Type: Improvement
> Components: core-beans
> Reporter: Todd Volkert
> Assignee: Todd Volkert
> Priority: Minor
> Fix For: 2.0
>
>
> Scenario:
> public class A {
> }
> public class B extends A implements Bindable {
> @BXML Foo foo;
> @Override
> public void initialize(...) {
> System.out.println(foo.getClass().getSimpleName());
> }
> }
> public class C extends B {
> @BXML Bar bar;
> @Override
> public void initialize(...) {
> super.initialize();
> System.out.println(bar.getClass().getSimpleName());
> }
> }
> Now, in test.bxml, you have:
> <C/>
> You expect the following output:
> "Foo
> Bar"
> And yet we only bind the object to class C, meaning you instead will get a NullPointerException trying to de-reference 'foo'.
> We should bind to all classes that implement Bindable.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.