Matt Kendall wrote: > Right, I'm trying to use the Serviceable interface with my action and > to get my component through the lookup() method. Here's my action: > > public class CVSUpdateAction extends AbstractAction implements Serviceable { > private CVSComponent cvs; > public Map act(Redirector redirector, SourceResolver source, > Map objectModel, String src, Parameters parameters) > throws Exception { > Map map = new FastHashMap(1); > > map.put("updated", new Boolean(cvs.updateRepo(parameters > .getParameter("repo")))); > > return map; > } > > public void service(ServiceManager manager) throws ServiceException { > cvs = (CVSComponent) manager.lookup(CVSComponent.ROLE); > } > }
One hint I only discovered recently - if you're using Cocoon 2.1.X, ensure that your component implements the Component interface, otherwise you'll get messy stuff happening with proxies. Don't now whether that has anything to do with your problem though. Regards, Upayavira > On 11/12/05, Joerg Heinicke <[EMAIL PROTECTED]> wrote: > >>On 12.11.2005 00:15, Matt Kendall wrote: >> >> >>>I'm trying to write a component that will connect to CVS. I'm using a >>>component because I need to interact with it from several different >>>sitemap components, so I figured that this was easiest. >>> >>>The problem I'm having is that Cocoon doesn't seem to pick up the >>>configuration that I'm placing in cocoon.xconf. The component seems to >>>get registered OK, but it doesn't get passed the configuration >>>information. As soon as I try to use the component, in an Action for >>>the moment, I errors due to an empty configuration object inside of >>>CVSComponentImpl. If I do a toString on the configuration object, I >>>get "::<no value>:@-". >>> >>>I'm really not sure what I'm doing wrong. Hopefully it's something >>>incredibly simple. >> >>How do you look up your component? Pure instantiation (new >>CVSComponentImpl()) is not sufficient. >> >>Jörg >> >>--------------------------------------------------------------------- >>To unsubscribe, e-mail: [EMAIL PROTECTED] >>For additional commands, e-mail: [EMAIL PROTECTED] >> >> > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]