I'm guessing that the grid links are zone-enabled, so clicking them triggers
AJAX calls rather than direct links.

On Tue, May 11, 2010 at 9:17 AM, Radek Terber <ter...@b2bcentrum.cz> wrote:

> The behavoior of combination of JQ tabs and T5 is quite strange. Tabs are
> loaded dynamically using it's links like this:
>
> <div id="content" class="ui-tabs ui-widget">
> <ul id="content-tabs-handles">
> <li id="actualTab">
> <a t:type="pageLink" t:page="switch"
> t:context="literal:actual">Aktuálne(</a>
> </li>
> <li id="switchTab">
> <a t:type="pageLink" t:page="switch" t:context="literal:archive">Archív</a>
> </li>
>  ...etc...
> </ul>
> In case the tab content is loaded firt time, all is OK, tab content is
> loaded sucesfully, T5 server returns content type "text/html" with the page
> rendered.
> But if a T5 grid exists inside the returned content, after click on link in
> grid header (= change sorting), or on pagination links, the T5 server
> returns content type "text/json" and only "{}" = empty JSON. Sort and
> pagination links are rendered as event links by T5 - for example: "
> http://localhost:8080/actual.content.grid.columns:sort/serialNum";. This is
> the only difference.
> If I compared request sent in first time content is loaded with subsequent
> requests (sent in case sort links are clicked on), I did not find any
> differences (except URL): in both cases, the header field
> "X-Requested-With=|XMLHttpRequest|" exists. When I striped out the
> "X-Requested-With" header field (using FF header modification plugin), all
> was OK - server always returned HTML.
>
> Dne 11.5.2010 3:36, Alex Kotchnev napsal(a):
>
>  Radek,
>>    what if you just point the URL that's used w/ jQuery tabs to a regular
>> Tapestry page ? If I recall correctly, the jQuery tabs used a<ul>, and
>> each
>> <li>  with<a href=#">   inside had an URL of a standalone page that
>> renders
>> w/o any particular layout .
>>
>> Regards,
>>
>> Alex K
>>
>> 2010/5/10 Radek Terber<ter...@b2bcentrum.cz>
>>
>>
>>
>>> Hi all
>>>
>>> I try to use jQuery "tabs" together with the T5 grid in simple page - the
>>> page with grid is put as content of a tab (it seams to be good idea due
>>> application could be divided into amall pieces - without static component
>>> dependencies, as it is required by tabs made using T5, and I can combine
>>> T5
>>> pages with other resources in tabs). It works fine, but grid's links for
>>> paging and sorting does not function. I have registered listeners on
>>> "onclick" evets on those links and send AJAX request to T5, but T5 - when
>>> gets XmlHttpRequest - does not render HTML page, but it returns enpty
>>> JSON.
>>> How to tel the T5 to render notmal HTML page in respone on XmlHttpRequest
>>> (aka AJAX request) ?  I cannot use "ajax" variant of grid sorting and
>>> paging, I need just use the page.
>>>
>>> Thanks, radek.
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
>>> For additional commands, e-mail: users-h...@tapestry.apache.org
>>>
>>>
>>>
>>>
>>
>>
>
>

Reply via email to