i’m new to apache pivot. recently i’m working under Eclipse, using this Pivot and Java prog for etablishing a IHM for a stand alone application.
i encounter a problem here,
i defined a “main ” bxml tabPane.bxml,
inside it i use a nested bxml and “include” in the code,
bxml:include bxml:id="shipPanel" src="shipping.bxml" Accordion.headerData="params"/>
then in the shipping.bxml code, i declare
<PushButton bxml:id="nextButton" xxxxx
now i want to use the instance nextButton in my java code,
i did this as before to by getting the namespace nextButton:
nextButton = (PushButton)namespace.get("nextButton");
but when i run the prog, it come always this error:
java.lang.NullPointerException
seems it didn’t recognize the nextButton.
Then i did a test, i declare a PushButton in the main bxml, named it id = nextButton, this case, it compile well .
so my question is, when my instance defined in a nested bxml(using include in main bxml), how can i reference it later in java code ?
any body can help? Thank you!!
Well so i got the solution from its mailing list forum of pivot.
in fact, it suffit of adding a sentence ” inline = “true” ” in the attribut of the spot where you include the nested bxml file. in this way, in java it can recognize all those id you have defined in both main bxml code or nested bxml code.
thanks those experts from the pivot mailing list forum who have given good advices.
finish!!!