Robert Zeigler-6 wrote:
>
> probably your best bet would be to stream the ajax response and then as
> part of the ajax response, have a hidden link that is called after the
> ajax response is sent, and /that/ triggers the excel file generation.
> You can't have two different responses to the same request... but you can
> chain a series of requests and responses together to achieve a similar
> effect. :)
>
> Robert
>
> On Dec 23, 2010, at 12/235:44 PM , iberck wrote:
>
>>
>> Thank you for the reponse Thiago
>> So can't I generate a stream file and then use ajax request in the same
>> page?
>>
>> Thanks in advance
>> --
>> View this message in context:
>> http://tapestry.1045711.n5.nabble.com/Problem-with-StreamResponse-and-Ajax-tp3316957p3317114.html
>> Sent from the Tapestry - User mailing list archive at Nabble.com.
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [email protected]
>> For additional commands, e-mail: [email protected]
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>
>
Thank you Robert for your response
I'm trying to stream the ajax response:
Page.tml
-------------------------
<t:zone t:id="zonaOpenPopup"></t:zone>
<t:actionlink t:id="reporteCostosExcel"
zone="zonaOpenPopup">reporteCostosExcel</t:actionlink>
-------------------------
Page.java
-------------------------
Object onActionFromReporteCostosExcel(Integer idEncuestador, Date
fechaIni, Date fechaFin) {
return resources.createEventLink("update");
}
Object onUpdate() {
ByteArrayOutputStream baos = new ByteArrayOutputStream();
ExcelStreamResponse excelStream = new ExcelStreamResponse(baos,
"resumen_costos");
return excelStream;
}
-------------------------
When I trigger the ajax request with the actionlink it generates the stream
excel file fine but when I click any another actionlink the ajax request
doesn't work
Thank you for your time
--
View this message in context:
http://tapestry.1045711.n5.nabble.com/Problem-with-StreamResponse-and-Ajax-tp3316957p3317152.html
Sent from the Tapestry - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]