tapestry-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Pierce Wetter (JIRA)" <j...@apache.org>
Subject [jira] Created: (TAP5-1200) Nested Ajax calls result in a call to $T(null)
Date Fri, 02 Jul 2010 23:51:52 GMT
Nested Ajax calls result in a call to $T(null)

                 Key: TAP5-1200
                 URL: https://issues.apache.org/jira/browse/TAP5-1200
             Project: Tapestry 5
          Issue Type: Bug
    Affects Versions: 5.2.0
            Reporter: Pierce Wetter

This used to work, now it doesn't, so this probably broke recently. I have a component that's
a wrapper around a Grid to implement a list--> detail ajax update. So far so good, it works
if it starts visible in a page. 

Then elsewhere, I re-use that component, but its hidden behind a button that shows the grid
via a progressive display and Ajax. 

The grid appears, but the click on the grid gets a javascript error because its calling $T(null)
so no details appear. This used to work. I asked on the list, and Howard said:

"This sounds like a new bug, some kind of order-of-operations problem.
Please add an issue."
I also note that $T is supposed to be deprecated anyways. 


I have a component I'll call "EntityGrid". Basically, its wrapper around the Grid. When you
click on an item in the GRid, a Zone gets refreshed displaying details about that item.


<t:container xmlns:t="http://tapestry.apache.org/schema/tapestry_5_1_0.xsd" xmlns:p="tapestry:parameter">

    <t:zone t:id="popupZoneActivation">
    <table t:type="grid" t:source="activationSource" t:row="activation" t:id="grid" t:rowClass="prop:evenOdd.next"
model="model" t:inPlace="true">
        <t:parameter name="uuidCell">
            <a t:type="eventlink" class="buttonPopup" t:zone="popupZoneActivation" t:context="activation.uuid"
t:event="popup" href="#">${activation.uuid}</a>
            <p>There are no  activation records to display. </p>
    <t:block id="activationDetails">
        <script> document.location.hash=""; document.location.hash="popupZoneActivation";</script>

            <div id="formsectionPopup">
                <span t:type="pace/view/ActivationViewShort" t:id="activationView" t:activation="detailActivation"></span>
                <span id="popupbuttons">
                    <t:pagelink class="button" t:id="ViewActivationLink" page="pace/view/${detailActivation.class.simpleName}"
context="detailActivation.uuid">View Detail</t:pagelink> 
                    <t:pace.schemaeditlink class="button" t:id="EditActivationLink" listSource="activationSource"
label="literal:Edit" ourState="ourState" steps="literal:1" source="detailActivation"/>

The above works at the top level in a page. Elsewhere, I have it behind a button (because
fetching the grid might be slow):

Hidden behind button TML:

<hr />		

                <t:zone t:id="popupZoneactivations">
                    <a class="button" t:type="eventlink" t:zone="popupZoneactivations"
t:context="literal:activations" t:event="showToMany">Show activations</a>
                <t:block id="activationsGridBlock">
                    <t:progressivedisplay update="slidedown" initial="block:activationsProgress">
                        <div class="progressivedisplay">
                            <span class="text">activations has ${dright.activations.size()}
items <br /></span>
                            <span t:type="pace/grid/ActivationGrid" activationSource="dright.activations">Grid
                <t:block id="activationsProgress">
                    <img class="loader" src="${context:img/ajax-loader.gif}" /> Loading

The grid appears, but clicks in the grid run into the $T(null) error above. 

Looking at the XHR stuff that went back and forth in the latest version of Safari, it all
looks ok, but as I said, it fails with $T(null).

No custom Javascript. 

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message