I was able to use Bindable for my custom classes and it works great.
Does binding work (without implementing Bindable) on the main class that
implements Application? I get nullpointers when I try it at that level.
I'm using the serializer to read the top Window element, but the inner
Accordion element wont bind with my "@WTKX public Accordion
accordion_entities;"
This wont work:
WTKXSerializer wtkxSerializer = new WTKXSerializer();
window = (Window) wtkxSerializer.readObject(new
FileInputStream("c:\\rpiotrowski\\solr\\topwindow_v2.xml"));
System.out.println("accordion_user_data:" +
accordion_entities.getUserData().get("url_solr_base").toString());
But this will:
WTKXSerializer wtkxSerializer = new WTKXSerializer();
window = (Window) wtkxSerializer.readObject(new
FileInputStream("c:\\rpiotrowski\\solr\\topwindow_v2.xml"));
accordion_entities= (Accordion)
wtkxSerializer.get("accordion_entities");
System.out.println("accordion_user_data:" +
accordion_entities.getUserData().get("url_solr_base").toString());
Bob
On Thu, Mar 4, 2010 at 3:47 PM, Greg Brown <[email protected]> wrote:
> No, WTKXSerializer will call that automatically if your root element
> implements Bindable.
>
> On Mar 4, 2010, at 4:44 PM, Robert Piotrowski wrote:
>
> Do I have to call Initialize() explicitly?
>
>
>
> Bob
>
> On Thu, Mar 4, 2010 at 3:40 PM, Greg Brown <[email protected]> wrote:
>
>> > If I extend a splitpane and then use that subclass in the wtkx, i think
>> i should be fine.
>>
>> I didn't read your email closely enough before I responded. This is
>> exactly where Bindable can help you. If the custom subclass you create
>> implements Bindable, all the elements in the WTKX file that have IDs will
>> automatically be mapped to member variables in your class. Then when
>> initialize() is called, these member variables will be available for you to
>> attach listeners, etc.
>>
>>
>
>