Hi Markus,

Actually no. I couldn't find any way to make a conditional redirect from an
xhttp action method.

My work around was to do the redirect on the client side based on the return
value of the action method, but unfortunately this means two trips to the
server.

Let me know if you can find a solution.

Andrew




Markus Joschko wrote:
> 
> Hi Andrew,
> have you found the solution? I try the same but using the normal page
> navigation patterns result into
> 
>  Caused by: java.lang.RuntimeException: A component event handler
> method returned the value profile/Profiles. Return type
> java.lang.String can not be handled.  Configured return types are
> org.apache.tapestry5.StreamResponse,
> org.apache.tapestry5.json.JSONObject,
> org.apache.tapestry5.runtime.Component,
> org.apache.tapestry5.runtime.RenderCommand.
>       at
> org.apache.tapestry5.internal.services.ObjectComponentEventResultProcessor.processResultValue(ObjectComponentEventResultProcessor.java:39)
>       at
> $ComponentEventResultProcessor_11bf1136128.processResultValue($ComponentEventResultProcessor_11bf1136128.java)
>       at
> $ComponentEventResultProcessor_11bf1136126.processResultValue($ComponentEventResultProcessor_11bf1136126.java)
>       at
> org.apache.tapestry5.internal.services.ComponentResultProcessorWrapper.handleResult(ComponentResultProcessorWrapper.java:42)
>       at
> org.apache.tapestry5.internal.structure.ComponentPageElementImpl$15.handleResult(ComponentPageElementImpl.java:1008)
>       at
> org.apache.tapestry5.internal.services.EventImpl.storeResult(EventImpl.java:67)
> 
> 
> Thanks,
>  Markus
> 
> 
> 
> On Sun, Apr 27, 2008 at 11:06 PM, Andrew Court <[EMAIL PROTECTED]>
> wrote:
>>
>> Hi all,
>>
>> In T5, from an Ajax request, is it possible to redirect to a different
>> page?
>>
>> What I'm trying to do is something like below:
>>
>> Object onSomeAjaxRequest(){
>>
>>  if(some condition){
>>  exit xhttp and jump to a different page
>>  }
>>  else{
>>  return xhttp response to same page
>>  }
>>
>> }
>>
>> But this doesn't seem to work.
>>
>> Thanks for any pointers,
>> Andrew
>> --
>> View this message in context:
>> http://www.nabble.com/Return-page-from-ajax-request-tp16927742p16927742.html
>> Sent from the Tapestry - User mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> 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]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Return-page-from-ajax-request-tp16927742p19129107.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


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

Reply via email to