pivot-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Robert Piotrowski <rpiotrow...@azonic.net>
Subject extending a component
Date Thu, 04 Mar 2010 15:14:12 GMT
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
        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

        accordion_entities= (Accordion)

        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:" +

//fails        accordion_entities.add(new
//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?


View raw message