Hi Filip,

thanks for your help...

the method getPage().getComponent() return a object IComponent. I can't cast this object to IDirect. This is the problem.

[]'s,
Rodnei Couto



Filip S. Adamsen escreveu:
Hi,

DirectLink, Form, and Go implement IDirect, so you can pass a reference to a component of one of these types to the DirectServiceParameter constructor:

  IDirect component = getPage().getComponent("expand");
DirectServiceParameter parameter = new DirectServiceParameter(component, parameters); String urlExpand = getDirectService().getLink(false, parameter).getLink().getURL();

Hope this helps.

-Filip

Rodnei Couto skrev:
Hi list,

In tapestry 3, i got a url to my page using this:

String urlExpand = cycle.getEngine().getService(
               Tapestry.DIRECT_SERVICE).getLink(cycle,
               cycle.getPage().getComponent("expand"), params).getURL();


In typestry 4, i inject the direct service, but when i will get a url from the method getLink, it receive a boolean and a Object parameter. I create a DirectServiceParameter, but this constructor receive a IDirect, not a IComponet, that was received in getLink() past version.

Somebody can help-me?

[]'s
Rodnei Couto

---------------------------------------------------------------------
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]

Reply via email to