I don't see anything in the BXMLSerializer code that would seem to be a problem. The content should be set by the included source. I'm wondering if there is a problem because of the namespace of your included file.... Does it make any difference if you make the "infoTab" into a regular component (maybe SplitPane, I'm guessing?) rather than using your custom component?
~Roger From: Ajay Bhat [mailto:[email protected]] Sent: Wednesday, September 04, 2013 8:09 AM To: [email protected] Subject: Re: Getting referenced BXML files of main file into the class Okay, I fixed the earlier problem somewhat by making all names inline, but now I've encountered a new one. It would be nice if someone could help me with it. I have defined a border and its children as: <TablePane.Row height="1*"> <TabPane bxml:id="tabPane"> <tabs> <Border> <content> <bxml:include bxml:id="infoTab" src="InfoTab.bxml" inline="true" /> </content> </Border> //many other tabs and rows </TabPane> </TablePane.Row> In the InfoTab.bxml I have. <luke:InfoTab xmlns:bxml="http://pivot.apache.org/bxml" xmlns:content="org.apache.pivot.wtk.content" xmlns="org.apache.pivot.wtk" xmlns:luke="org.apache.lucene.luke.ui" > <top> <Border> <content> <ScrollPane horizontalScrollBarPolicy="fill_to_capacity"> //many other components </ScrollPane> </content> </Border> </top> <bottom> <Border> <content> <TablePane bxml:id="bottomTable"> //many other components </TablePane> </content> </Border> </bottom> </luke:InfoTab> In my main Java file I have a method to recursively change style of all components. private void recChangeStyle(Component component) { if (component instanceof Border) { //apply style to border System.out.println("style applied to Border"); component = ((Border) component).getContent(); recChangeStyle(component); } else if //deal with other components } So when reaching the InfoTab aka the border shown above I can't access the content of the border, all I get is a null on checking the content of border. Can anyone help me out here? Regards, Ajay Bhat
