So this is what I've done.
iMarkupWriter.printRaw(this.getFileDownloadService().getLink(false, new
java.lang.Object[] {this.getFileId()}).getURL());
I get the url, but how do I make the url friendly. The editor keeps
changing the url. For example the output is:
./app?com.collegevitae.fileid=2&service=FileDownloadService
but the editor keeps changing it to:
../?com.collegevitae.fileid=2&service=FileDownloadService
I'm guessing friendly urls would fix this, but what's the best way to
create one? Or is there another method, I'm using TinyMCE.
Mike Snare wrote:
> 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]
>
>
>
>
--
Justin Stanczak
Stanczak Group
812-735-3600
"All that is necessary for the triumph of evil is that good men do nothing."
Edmund Burke
..________...............__.................
./ _____/..____..._____/..|_..____...____....
/...\..____/.__.\./....\...__\/.._.\./._..\....
\....\_\..\..___/|...|..\..|.(..<_>.|.<_>..)....
.\______../\___.._\__|../__|..\____/.\____/......
........\/.....\/.....\/..........................
--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]