You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Janko Muzykant <um...@gmail.com> on 2008/06/11 17:03:24 UTC
T5 Possible bug while returning Block component
hi, i have just discovered something odd while returning the Block element
for Ajax update. if I enter manually URL that should return a Block from
handler method i get the following:
An unexpected application exception has occurred.
A component event handler method returned the value
org.apache.tapestry.internal.structure.BlockImpl@1e20120. Return type
org.apache.tapestry.internal.structure.BlockImpl can not be handled.
Configured return types are java.lang.Class, java.lang.String, java.net.URL,
org.apache.tapestry.Link, org.apache.tapestry.StreamResponse,
org.apache.tapestry.runtime.Component.
of course, clicking the link instead of typing works perfectly.
regards,
jm.
--
View this message in context: http://www.nabble.com/T5-Possible-bug-while-returning-Block-component-tp17780025p17780025.html
Sent from the Tapestry - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: T5 Possible bug while returning Block component
Posted by Josh Canfield <jo...@thedailytube.com>.
Uh, yeah :) I won't deny that I make that same typo in my code, too bad
gmail doesn't have intellij built in to tell me which methods belong to
which objects... maybe a gmail plugin for intellij...
On Wed, Jun 11, 2008 at 10:18 AM, Filip S. Adamsen <fs...@fsadev.com> wrote:
> Shouldn't that be request.isXHR?
>
> -Filip
>
> Josh Canfield skrev:
>
> Ajax is detected by an http header passed by the prototype ajax
>> request. If your request isn't coming from an ajax method then you
>> don't get an ajax response.
>>
>> This can also be an issue if you're trying to roll your own XHR
>> requests (you can add the header manually)
>>
>> You can detect if Tapestry thinks the request is partial (ajax) or
>> full by calling resources.isXHR().
>>
>> If you expect that you might be getting non-ajax requests to that url
>> then you can use that check to return a redirect link, or render a
>> complete page.
>>
>> Josh
>>
>> On Wed, Jun 11, 2008 at 8:03 AM, Janko Muzykant <um...@gmail.com> wrote:
>>
>>> hi, i have just discovered something odd while returning the Block
>>> element
>>> for Ajax update. if I enter manually URL that should return a Block from
>>> handler method i get the following:
>>>
>>> An unexpected application exception has occurred.
>>>
>>> A component event handler method returned the value
>>> org.apache.tapestry.internal.structure.BlockImpl@1e20120. Return type
>>> org.apache.tapestry.internal.structure.BlockImpl can not be handled.
>>> Configured return types are java.lang.Class, java.lang.String,
>>> java.net.URL,
>>> org.apache.tapestry.Link, org.apache.tapestry.StreamResponse,
>>> org.apache.tapestry.runtime.Component.
>>>
>>> of course, clicking the link instead of typing works perfectly.
>>>
>>> regards,
>>> jm.
>>>
>>> --
>>> View this message in context:
>>> http://www.nabble.com/T5-Possible-bug-while-returning-Block-component-tp17780025p17780025.html
>>> Sent from the Tapestry - User mailing list archive at Nabble.com.
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>>> For additional commands, e-mail: users-help@tapestry.apache.org
>>>
>>>
>>>
>>
>>
>>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>
--
--
TheDailyTube.com. Sign up and get the best new videos on the internet
delivered fresh to your inbox.
Re: T5 Possible bug while returning Block component
Posted by "Filip S. Adamsen" <fs...@fsadev.com>.
Shouldn't that be request.isXHR?
-Filip
Josh Canfield skrev:
> Ajax is detected by an http header passed by the prototype ajax
> request. If your request isn't coming from an ajax method then you
> don't get an ajax response.
>
> This can also be an issue if you're trying to roll your own XHR
> requests (you can add the header manually)
>
> You can detect if Tapestry thinks the request is partial (ajax) or
> full by calling resources.isXHR().
>
> If you expect that you might be getting non-ajax requests to that url
> then you can use that check to return a redirect link, or render a
> complete page.
>
> Josh
>
> On Wed, Jun 11, 2008 at 8:03 AM, Janko Muzykant <um...@gmail.com> wrote:
>> hi, i have just discovered something odd while returning the Block element
>> for Ajax update. if I enter manually URL that should return a Block from
>> handler method i get the following:
>>
>> An unexpected application exception has occurred.
>>
>> A component event handler method returned the value
>> org.apache.tapestry.internal.structure.BlockImpl@1e20120. Return type
>> org.apache.tapestry.internal.structure.BlockImpl can not be handled.
>> Configured return types are java.lang.Class, java.lang.String, java.net.URL,
>> org.apache.tapestry.Link, org.apache.tapestry.StreamResponse,
>> org.apache.tapestry.runtime.Component.
>>
>> of course, clicking the link instead of typing works perfectly.
>>
>> regards,
>> jm.
>>
>> --
>> View this message in context: http://www.nabble.com/T5-Possible-bug-while-returning-Block-component-tp17780025p17780025.html
>> Sent from the Tapestry - User mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>> For additional commands, e-mail: users-help@tapestry.apache.org
>>
>>
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: T5 Possible bug while returning Block component
Posted by Josh Canfield <jo...@thedailytube.com>.
Ajax is detected by an http header passed by the prototype ajax
request. If your request isn't coming from an ajax method then you
don't get an ajax response.
This can also be an issue if you're trying to roll your own XHR
requests (you can add the header manually)
You can detect if Tapestry thinks the request is partial (ajax) or
full by calling resources.isXHR().
If you expect that you might be getting non-ajax requests to that url
then you can use that check to return a redirect link, or render a
complete page.
Josh
On Wed, Jun 11, 2008 at 8:03 AM, Janko Muzykant <um...@gmail.com> wrote:
>
> hi, i have just discovered something odd while returning the Block element
> for Ajax update. if I enter manually URL that should return a Block from
> handler method i get the following:
>
> An unexpected application exception has occurred.
>
> A component event handler method returned the value
> org.apache.tapestry.internal.structure.BlockImpl@1e20120. Return type
> org.apache.tapestry.internal.structure.BlockImpl can not be handled.
> Configured return types are java.lang.Class, java.lang.String, java.net.URL,
> org.apache.tapestry.Link, org.apache.tapestry.StreamResponse,
> org.apache.tapestry.runtime.Component.
>
> of course, clicking the link instead of typing works perfectly.
>
> regards,
> jm.
>
> --
> View this message in context: http://www.nabble.com/T5-Possible-bug-while-returning-Block-component-tp17780025p17780025.html
> Sent from the Tapestry - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>
--
--
TheDailyTube.com. Sign up and get the best new videos on the internet
delivered fresh to your inbox.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org