After some hours of further testing, filed a JIRA issue that you can see at:

https://issues.apache.org/jira/browse/TAP5-1107

Best


Juan Isern wrote:
> 
> Hi guys, hope you're doing fine.
> 
> I was developing a component to load lazily content and I'm facing a
> problem: forms seem to break when they're rendered from a Block to an AJAX
> zone. 
> 
> They same problem occurs with ProgressiveDisplay. A very simple example
> that shows the issue:
> 
>                                <t:progressivedisplay>
>                                     <t:zone t:id="someZone">
>                                         <t:form t:id="aForm"
> t:zone="someZone">
>                                             <t:submit/>
>                                         </t:form>
>                                     </t:zone>
>                                 </t:progressivedisplay>
> 
> When Submit is clicked, nothing happens. Doing a little research, I found
> this JSON that results from the block rendering:
> 
> {"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"}
> 
> It seems that the problem lies in the fact that there's mismatch in the
> ids. While Tap assigns its own id by appending some random characters at
> the end of it, when registers a listener (I think...) it's using the
> ordinary "someZone" id, that's making some Javascript break.
> 
> Do you guys have any clue about a possible workaround? It's driving me
> nuts!
> 
> Cheers!
> 
> 
> 
> 

-- 
View this message in context: 
http://old.nabble.com/Problem-with-a-form-in-a-Block-%2B-AJAX-tp28287358p28287727.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org

Reply via email to