Heh. I was going to suggest that you take a look at the Bindable interface for 
this use case as well.

I really need to get that part of the tutorial done.  :-)


On Mar 4, 2010, at 11:14 AM, Robert Piotrowski wrote:

> never mind.
> 
> I'm a bonehead.
> 
> 
> 
> Sorry.
> 
> 
> 
> 
> 
> 
> On Thu, Mar 4, 2010 at 9:14 AM, Robert Piotrowski <[email protected]> 
> wrote:
> I'm trying to add independent SplitPane classes to an Accordian.  All 
> SplitPanes are pretty similar and I wanted them to run independently so I 
> tried this:
> 
> public class EntityPane extends SplitPane{
> 
>     SplitPane entity_pane;
> 
>     public EntityPane(String URL) throws Exception{
> 
>         WTKXSerializer wtkxSerializer = new WTKXSerializer();
>         System.out.println("url:"+ URL);
>         this.entity_pane = (SplitPane) wtkxSerializer.readObject(new 
> FileInputStream(URL));
>         System.out.println("inner_user_data:" + 
> entity_pane.getUserData().get("entity").toString());  //This works.
> 
>     }
> 
> }
> 
> 
> And then I tried adding them to the accordion this way, but I'm getting a 
> null pointer when trying to access the userdata or adding it to the accordion 
> add setting the index to zero:
> 
> public void startup(Display display, Map<String, String> properties)
>             throws Exception {
>         WTKXSerializer wtkxSerializer = new WTKXSerializer();
> 
>         window = (Window) wtkxSerializer.readObject(new 
> FileInputStream("c:\\rpiotrowski\\solr\\topwindow_v2.xml"));
> 
>         accordion_entities= (Accordion) 
> wtkxSerializer.get("accordion_entities");
>   
>         EntityPane person = new 
> EntityPane("c:\\rpiotrowski\\solr\\pane_person.xml");  //The instantiation 
> shows the inner system.out.println above.
>             
>         System.out.println("outer_user_data:" + 
> person.getUserData().get("entity").toString());
> 
> //fails        accordion_entities.add(new 
> EntityPane("c:\\rpiotrowski\\solr\\pane_person.xml"));
> //fails        accordion_entities.setSelectedIndex(0);
> 
> 
> I want to encapsulate the splitpanels into their own java objects to make all 
> the eventhandling easier.  If I have everything in one xml_file then I have 
> to pass the splitpanel to every listener, etc.
> 
> 
> If I do "includes" in the xml, I'll end up with a everything in one big main 
> class again.  Right?
> 
> 
> 
> 
> Bob
> 

Reply via email to