Inject the service into your page from the page file:
<inject property="myService"
object="service:@[EMAIL PROTECTED]"/>
Then in your page class:
ILink link = getMyService().getLink(true, someParameterObject).
True == post, false = get.
For the second argument, that's a contract between the caller of the
service and the service itsself. You're free to define a
FileDownloadServiceArgs object if you want and pass that in. You
could just use a csv, or if it's only one argument a simple string
would do. The FileDownloadService itsself should cast to whatever dto
you decide on then create the url.
-Mike
On 3/27/06, Stanczak Group <[EMAIL PROTECTED]> wrote:
> I'm trying to create a link to a service I made with parameters. I did
> this in 3.0 using the following, but not sure which way to go in 4.0?
>
> org.apache.tapestry.engine.IEngineService service =
> iRequestCycle.getEngine().getService(FileDownloadService.SERVICE_NAME);
> org.apache.tapestry.engine.ILink iLink = service.getLink(iRequestCycle,
> this, new java.lang.Object[] {this.getFileId()});
> iMarkupWriter.printRaw(iLink.getURL());
>
> As you can see all I'm trying to do is get a string of a URL to the
> service, in order to render it to the page so users can copy the link.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]