Thanks for that, but I don’t suppose you know the v3.0.3 equivalent? Our company has chosen not to upgrade to 4 for a while :o(
-----Original Message----- From: news [mailto:[EMAIL PROTECTED] On Behalf Of Ron Piterman Sent: 23 September 2005 17:32 To: [email protected] Subject: Re: Building url's with parameters Inject the service tapestry.utl.LinkFactory create an ILink and get the absolute URl from it. http://jakarta.apache.org/tapestry/tapestry/hivedocs/module/tapestry.url.html http://jakarta.apache.org/tapestry/tapestry/apidocs/org/apache/tapestry/services/LinkFactory.html ציטוט Robert Haycock: > Hi, > > > > I'm trying to create a URL to put into some javascript (opening a new > window). I have a javascript function which takes a url and opens a > window with the url passed in. In my component I have a 'getUrl' method > which looks like this: > > > > >> public String getContributorUrl(IItemEntry item) > > >> { > > >> String[] params = {item.toString()}; > > >> String[] context = {"newwindow"}; > > >> EngineServiceLink url = new > > EngineServiceLink(this.getPage().getRequestCycle(), > > >> "page", context, params, > > true); > > >> return url.getURL(); > > >> } > > > > > Where "newwindow" is the component I'm trying to open in a new window. > This 'getUrl' method is called in the .page file so the resulting HTML > looks something like: > > > > <... ondblclick="openWin('/mwc/app?service=page/newwindow&sp=43382');" > ....> > > > > Problem is the parameters aren't passed to the new component. newwindow > extends BasePage. newwindow has the following: > > > > >> public void validate(IRequestCycle cycle) > > >> { > > >> Object[] params = cycle.getServiceParameters(); > > > > > Problem is that params is null. How can I create a link with parameters > to stick in some javascript? > > > > Rob. > > --------------------------------------------------------------------- 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]
