Pivot
  1. Pivot
  2. PIVOT-596

BXMLSerializer should call bind() on superclasses when appropriate

    Details

    • Type: Improvement Improvement
    • Status: Resolved
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.0
    • Component/s: core-beans
    • Labels:
      None

      Description

      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.

        Activity

        No work has yet been logged on this issue.

          People

          • Assignee:
            Todd Volkert
            Reporter:
            Todd Volkert
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development