From: Kay <Kay...@be...> - 2005-09-16 14:56:04
|
Hi again, I'm afraid it turns out that we have to change a little bit more internally in order to encapsulate the mechanics of loading XML files in one central place. We'll have to postpone that to next week. Rahu, do you plan to use (or are you using) the include functionality of gui4j (<Include> element)? If so, how would you like to handle those includes if your original file was loaded in a custom manner and passed to gui4j via an InputStream? Our current idea is that there's a new interface named Gui4jResourceProvider and if you provide gui4j with an object of that type it will be responsible for loading all XML input, also for includes. That means, it is up to your implementation to interpret the "url" attribute of <Include>. The content of "url" does not necessarily need to be a real URL anymore, of course. Regards, Kay > > Hi, > > Reading in the xml is currently done via Java's Ressource mechanism, > so it's not possible right now to simply read from a String or InputStream. > > I've talked to Joachim about this and we think it would be a useful > addition to be able to chose one of several ways to read in the xml > definition. We'll provide a central hook in the code for loading xml > definitions so that it's possible to provide different > implementations. The default way will be the current Resource > mechanism. After the hook is in place it should be easy for you to > implement any loading > mechanism you like. We'll be happy to include your contribution into > gui4j then. > > We'll send a note when the hook is in CVS... > > Thanks, > > Kay > > |