You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Kent Tong <ke...@cpttm.org.mo> on 2005/11/01 16:07:16 UTC

Re: Creating DirectLink URL inside page class.

Leo Sakhvoruk <leo.sakhvoruk <at> gmail.com> writes:

> I'm wondering if anybody knows and could possibly give me some pointers 
> as to how I can create a url string like that generated by the 
> DirectLink component inside the page class file? Is it possible to 
> create an ILink component with EngineServiceLink and then get a url from 
> that? If so, how do I specify the listener method and parameters, i.e. 
> does one go into service parameters and the other into context?

class Home {
  @InjectObject("engine-service:direct")
  IEngineService getDirectService();

  ILink getLink(IDirect direct, Object params[]) {
    return getDirectService().getLink(
      getRequestCycle(), 
      false, 
      new DirectServiceParameter(direct, params));
  }
}

--
Author of a book for learning Tapestry (http://www.agileskills2.org/EWDT)


---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org