AJAX stops working when enclosed in a Block
-------------------------------------------

                 Key: TAP5-1107
                 URL: https://issues.apache.org/jira/browse/TAP5-1107
             Project: Tapestry 5
          Issue Type: Bug
          Components: tapestry-core
    Affects Versions: 5.2.0
            Reporter: Juan Isern


Tapestry seems to ignore zone refreshes when those zones are included in 
content that was fetched via AJAX, as in:

                               <t:progressivedisplay>
                                    <t:zone t:id="someZone">
                                        <t:form t:id="aForm" t:zone="someZone">
                                            <t:submit/>
                                        </t:form>
                                    </t:zone>
                                </t:progressivedisplay> 

In this case, the Submit button does nothing. I tried with an actionlink with 
its zone parameter set and it doesn't work either.

Apparently this is the root cause of the problem, shown in this JSON:

{"content":"<div class='t-zone' id='someZone-1281488a10e'><form 
action='/sx/details.aform' method='post' id='aForm-1281488a10e' 
name='aForm-1281488a10e'><div class='t-invisible'><input value='1437' 
name='t:ac' type='hidden'><\/input><input 
value='H4sIAAAAAAAAAFvzloG1XICBzyW1JDEzp9iquDQpN7OkuIjBIb8oXS+xIDE5I1WvJLEgtbikqNJULzm/KDUnMwlI5xbk56XmlRTrBYN1qAQU5SenFheDecXFmfl5zx4GfW12XfyCiYHRh4E7NSc1F6jcLzE3tYRByCcrsSxRPycxL10/uKQoMy/duqKghIENYjkAwXYdZJMAAAA='
 name='t:formdata' type='hidden'><\/input><\/div><input name='submit' 
type='submit'><\/input><\/form><\/div>","script":"Tapestry.init({\"linkZone\":[[\"aForm-1281488a10e\",\"someZone\",\"/sx/details.aform\"]],\"zone\":[\"someZone-1281488a10e\"]});\n"}
 

Note that the actual zone id is "someZone-1281488a10e", whereas in the 
initialization script it is referred to as just "someZone". 

Later on, some function in javascript.js breaks down because there's no element 
with an id "someZone" (which is correct)

I bet that the solution shouldn't be very complex, but unfortunately my 
knowledge of the framework's internals is quite limited to solve it.

Regards.

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

Reply via email to