Search code examples
ajaxprototypejstapestry

tapestry zone update with post field in request


is there way to update tapestry zone by ZoneManager with POST field in request to server?

this works fine...

var zoneManager = Tapestry.findZoneManager($('textarea'));
var listenerURIWithValue = this.listenerURI;
listenerURIWithValue = this.addRequestParameter('param', $('textarea').value,     listenerURIWithValue);
zoneManager.updateFromURL(listenerURIWithValue);

but what if I have too long string in textarea? I need to send the $('textarea').value as a POST, not GET.

Has anybody an idea? Thank you for your responds.


Solution

  • I listed in Tapestry-prototypejs source code and finally I found the solution. Function updateFromUrl has another parameter.

    zoneManager.updateFromURL(listenerURIWithValue, 
            {
                "method": "post",
                "parameter": $('textarea').value
            });