Hello,
I do have a problem with I think the Ajax stuff I sent in my
previous e-mail.
I changed the progressbar example a bit so an ajaxform with
an ajax submit button appears after the task is completed.
Then I would like to serve data (that was created during the 
progressbar action) as a file.
I implemented a service which works if called from a normal
submitButton (I get a file).
But from the Button within this ajaxform I get no reponse in my
browser, although the method seems to execute fine .

What is wrong there and how can I achieve what I would like
to have?

Thank you very much for your answers.
ido


public void service(IRequestCycle arg0) throws IOException {
                writeFile(request, response);
}

public void writeFile(HttpServletRequest request,
                        HttpServletResponse response) {
                try {
                        response.setHeader("Cache-Control",     
"must-revalidate, post-check=0,                                 
pre-check=0");
                        response.setHeader("Pragma", "public");
                        response.setHeader("Content-disposition", "inline; 
filename="
                                        + "test.tsv");
                        response.setContentType("text/tab-separated-values");
                        String text = "hello world";
                        PrintWriter writer;
                        try {
                                writer = response.getWriter();
                                writer.write(text);
                                writer.close();
                                response.flushBuffer(); 
                                System.err.println("called streamResult");
                        } catch (IOException e) {
                                e.printStackTrace();
                        }

        } catch (Exception e) {
                        e.printStackTrace();
}

...
<span jwcid="@If" condition="ognl:active" >
            <div class="progressStart">
                  <a jwcid="progressCancel" >Cancel</a>
           </div>
</span>
<span jwcid="@If" condition="ognl:complete" >
        <form class="form" jwcid="downloadForm">
                <input style="margin-top:20px;margin-left:20px;padding:3px"     
                                                            
jwcid="@tacos:AjaxSubmit"
                         label="Download Results" 
listener="listener:downloadResults"/>
        </form>
</span>
....

and in .page:
        <component id="downloadForm" type="tacos:AjaxForm" >
                <binding name="updateComponents" value="ognl:{'linkPart'}" />
        </component>                    


-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid0944&bid$1720&dat1642
_______________________________________________
Tacos-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tacos-devel

Reply via email to