Thanks for your help. I am still having a little trouble with this though.
My hivemodule looks like this: <?xml version="1.0"?> <module id="com.tmit1.menudemo" version="1.0.0"> <service-point id="menuService" interface="model.IMenuService"> <invoke-factory service-id="hivemind.BuilderFactory" model="singleton"> <construct class="model.MenuCRUDXML" initialize-method="init"> <set-resource property="resource" path="menu.xml" /> </construct> </invoke-factory> </service-point> </module> My MenuCRUDXML.init method looks like this: public void init() throws URISyntaxException { System.out.println(resource.getResourceURL()); setMenuFile(new File(resource.getResourceURL().toURI())); } MenuCRUDXML has a getter and setter for resource. The print statement is returning null. What gives? Also, this is the code that I use to inject the service @InjectObject("service:com.tmit1.menudemo.menuService") public abstract IMenuService getMenuService(); I am not sure if that is correct or not. Is it? Thanks for your help, Rob -----Original Message----- From: Jesse Kuhnert [mailto:[EMAIL PROTECTED] Sent: Monday, March 13, 2006 3:56 PM To: Tapestry users Subject: Re: Best way to give pojo access to a file? http://tacos.sourceforge.net/hivemind/SiteMap.html It does almost exactly what you describe, except the UI portions are really more of an after thought, with the core work being done in a full fledged hivemind service. The tacos demo navigation system is built using this, but one could easily make the ui render drop-down menus or any style you want. On 3/13/06, Rob Dennett <[EMAIL PROTECTED]> wrote: > > I am writing a small sample app to demonstrate a menu component to my > boss. I want to populate this menu using an xml file. Later I may change > to using a database. I wrote a pojo that is supposed to read the xml doc > describing the menu and parse its contents into java beans for use by the > component. The problem I am having is how to give the pojo access to the > xml file. I could have the page that contains the component inject the > service, inject the xml asset and pass the asset's input stream to the > service, but I want to keep the details of how things work from my pages and > components. There must be some way to inject the file into the pojo using > HiveMind, but I am not sure where to look. I want also want to know if I > can specify the xml file location relative to the web context. > > > > Thanks for your help, > > Rob > > > -- > No virus found in this outgoing message. > Checked by AVG Free Edition. > Version: 7.1.375 / Virus Database: 268.2.1/279 - Release Date: 3/10/2006 > > > -- No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.1.375 / Virus Database: 268.2.1/279 - Release Date: 3/10/2006 -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.385 / Virus Database: 268.2.2/280 - Release Date: 3/13/2006 --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]