Hi Brian, I'm not familiar with DirectArea but the changes should be relatively easy:
In DirectArea.jwc, inject the direct service (or you could do this with annotations): <inject property="directService" object="engine-service:direct"/> Add the abstract getter to DirectArea.java: public abstract IEngineService getDirectService(); The parameters need to be added into a DirectServiceParameter instance after being built by DirectLink.constructServiceParameters(): DirectServiceParameter dsParam = new DirectServiceParameter(this, parameters); Then to get your link just call getDirectService().getLink(false, dsParam). The request cycle is now injected, so that's why getLink() no longer needs it. And assuming DirectArea implements IDirect and has a trigger() method, you should be on the right track. Ben -----Original Message----- From: Brian Long [mailto:[EMAIL PROTECTED] Sent: Thursday, December 22, 2005 11:23 AM To: [email protected] Subject: DirectArea in 4.0 I'm using the custom component DirectArea that HLS described in Tapestry in Action. The problem is that after migrating to 4.0 the renderComponent method is using deprecated/changed methods 3.0 public void renderComponent(IMarkupWriter writer, IRequestCycle cycle) { if (cycle.isRewinding()) return; Object[] parameters = DirectLink.constructServiceParameters(getParameters()); IEngineService service = cycle.getEngine().getService(Tapestry.DIRECT_SERVICE); ILink link = service.getLink(cycle,this,parameters); writer.beginEmpty("area"); writer.attribute("href",link.getURL()); renderInformalParameters(writer,cycle); } 4.0 getEngine() from IEngine deprecated (service to be injected from somewhere?) getLink() from IEngineService now takes only two arguments a boolean and an Object? If anyone has already updated their DirectArea component to 4.0 could they please let me know what the changes are? /Brian. --------------------------------------------------------------------- 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]
