"Parameter parameter is of type java.lang.String which is not
compatible with org.apache.tapestry.engine.DirectServiceParameter."

The third parameter to the getLink() method (for the direct service)
must be a DirectServiceParameter, not a string.  I'm not sure how
Tapestry could phrase it any clearer.

On 1/30/06, Gerald Schöffel <[EMAIL PROTECTED]> wrote:
> Hi !
>
> While doing some research to solve this nasty https/http-switching problem I 
> have, I got to a point where a 'strange' exception is thrown.
>
> MyBasePage implements PageValidateListener:
>
> public void pageValidate(PageEvent event) {
>
>     String url = event.getRequestCycle().getService().getLink(true, 
> getPageName()).getAbsoluteURL() ;
>
>     ...
> }
>
> All my pages extend MyBasePage.
>
> In my login page when submited, the following is executed:
>
> getCallback().performCallback(getRequestCycle()) ;
>
> where the callback is a PageCallback to the page I redirected from with
>
> throw new PageRedirectException(loginPage);
>
> When the callback is executed a java.lang.ClassCastException is thrown:
>
> Parameter parameter is of type java.lang.String which is not compatible with 
> org.apache.tapestry.engine.DirectServiceParameter.
>
> with the following stack trace:
>
> # org.apache.hivemind.util.Defense.isAssignable(Defense.java:56)
> # org.apache.tapestry.engine.DirectService.getLink(DirectService.java:59)
> # $IEngineService_1091ab1a158.getLink($IEngineService_1091ab1a158.java)
> # 
> org.apache.tapestry.services.impl.EngineServiceOuterProxy.getLink(EngineServiceOuterProxy.java:61)
> # mypackage.MyBasePage.pageValidate(MyBasePage.java:24)
> # mypackage.MyTest.pageValidate(MyTest.java:42)
>
> where MyTest is the page I was redirecting from.
>
> Any ideas ?
>
> I am doing this pageValidate stuff to get the absolute URL as displayed in 
> the users browsers - maybe there is a better/easier/exceptionless way to do 
> this ?
>
> Thanks,
> Gerald
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


--
Howard M. Lewis Ship
Independent J2EE / Open-Source Java Consultant
Creator, Jakarta Tapestry
Creator, Jakarta HiveMind

Professional Tapestry training, mentoring, support
and project work.  http://howardlewisship.com

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to