Greg is probably best placed to answer your organizational/best practice questions.

Have you experimented with explicitly supplying the Resources to BXMLSerializer?

Would you be able to provide a simple example app to demonstrate the binding issue? Something that correctly loads & binds to classes from a.b.c, but not a.b.c.d.

Can you get binding to work in this scenario if you call bind() yourself?, java.lang.Class)


On 5 February 2011 06:52, Roger L. Whitcomb <> wrote:

Hi all,

Let me see if I can even ask this question intelligently:

- Ive got a package hierarchy where my main program lives in package a.b.c. In this directory I have, Main.json (with the resources) and some g.bxml files.

- In this main program I have a helper function that loads an object from a bxml file and binds to whatever object you give it. It uses a.b.c.Main as the class and a.b.c.Main for the resources.

- There is a that loads sheet1.bxml (all residing in a.b.c package) and all works fine and the @BXML variables get set correctly.

- Now I introduce a a.b.c.d package and want to load a dialog.bxml from this directory from (a.b.c.d.Dialog class) using my same helper function (from a.b.c.Main). First off, using a name of d/dialog.bxml loads the file fine and I can see it on screen, BUT none of my @BXML variables inside a.b.c.d.Dialog get set, and I get no errors or exceptions.

- Fine Im thinking its just a package problem, so I copy the helper function into and try to use the same resources from a.b.c.Main and it starts giving me Cant find resource for base name a.b.c.d.Dialog, locale en_US messages. Okay, so I have to move the resources into there too, which means more initialization, etc., etc.

So, I guess my question is this: what is the best way to organize the markup files and resource file(s) in this package hierarchy? And what is the right way to use the class names to load resources and send to the BXMLSerializer so that my annotated variables get set correctly? Should I always pass the same class name to the serializer (and hence put the resources and bxml files in the same directory(ies)) as the Java classes? If I want to put stuff in a common places (or places) where should that be?

Am I making sense here or is more detail needed? Thanks much!

Roger Whitcomb

Architect, Engineering

Ingres Corporation

PHONE +1 650.587.5596

FAX +1 650.587.5550

This transmission is confidential and intended solely for the use of the recipient named above. It may contain confidential, proprietary, or legally privileged information. If you are not the intended recipient, you are hereby notified that any unauthorized review, use, disclosure or distribution is strictly prohibited. If you have received this transmission in error, please contact the sender by reply e-mail and delete the original transmission and all copies from your system.