You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tapestry.apache.org by "Howard M. Lewis Ship (JIRA)" <ji...@apache.org> on 2013/07/25 02:19:50 UTC

[jira] [Closed] (TAP5-1200) Nested Ajax calls result in a call to $T(null)

     [ https://issues.apache.org/jira/browse/TAP5-1200?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Howard M. Lewis Ship closed TAP5-1200.
--------------------------------------

       Resolution: Fixed
    Fix Version/s: 5.4
         Assignee: Howard M. Lewis Ship

The changes in 5.4 ensure that nested zone updates are processed in the correct order, and all initialization is deferred to the end. In 5.3 and earlier, the zone updates were not in any particular order; now the order matches the order of calls to AjaxResponseRender.addRender().
                
> 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
>            Reporter: Pierce Wetter
>            Assignee: Howard M. Lewis Ship
>             Fix For: 5.4
>
>
> 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. 
> Details:
> 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.
> TML:
> <t:container xmlns:t="http://tapestry.apache.org/schema/tapestry_5_1_0.xsd" xmlns:p="tapestry:parameter">
>     <t:zone t:id="popupZoneActivation">
>     </t:zone>
>     <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>
>         </t:parameter>
>         <p:empty>
>             <p>There are no  activation records to display. </p>
>         </p:empty>
>     </table>
>     <t:block id="activationDetails">
>         <script> document.location.hash=""; document.location.hash="popupZoneActivation";</script>
>         <div>
>             <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"/>
>                 </span>
>             </div>
>         </div>
>     </t:block>
> </t:container>
> 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 />		
>                 <h2>activations</h2>
>                 <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:zone>
>                 <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 here</span>
>                         </div>
>                     </t:progressivedisplay>
>                 </t:block>
>                 <t:block id="activationsProgress">
>                     <img class="loader" src="${context:img/ajax-loader.gif}" /> Loading activations 
>                 </t:block>
> 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.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira