see how Link generates a callback url back to itself... -igor
On Nov 23, 2007 12:44 PM, Francisco Diaz Trepat - gmail <[EMAIL PROTECTED]> wrote: > more please? > > > On Nov 23, 2007 5:38 PM, Igor Vaynberg <[EMAIL PROTECTED]> wrote: > > > it can be a callback url, just like how Link works... > > > > -igor > > > > > > On Nov 23, 2007 12:36 PM, Francisco Diaz Trepat - gmail > > <[EMAIL PROTECTED]> wrote: > > > the window.location=downloadurl would indicate a previously existing > > file. > > > > > > but I don't have the file. > > > > > > I can call calculate() (returns a map) and/or calculatePdf() (returns a > > > base64 encoded pdf). > > > > > > It would be nice not to write the file on the server. > > > > > > Also, wouldn't window.location change the current view from a web page > > to a > > > pdf? That is not desired. > > > > > > f(t) > > > > > > > > > > > > > > > On Nov 23, 2007 5:05 PM, Igor Vaynberg <[EMAIL PROTECTED]> wrote: > > > > > > > refresh the components like you usually would and then add javascript > > > > that does window.location=downloadurl > > > > > > > > -igor > > > > > > > > > > > > On Nov 23, 2007 7:28 AM, Francisco Diaz Trepat - gmail > > > > <[EMAIL PROTECTED]> wrote: > > > > > Thanks but, It seams I need a bit more help. > > > > > > > > > > This was the original mail: > > > > > > > > > > > > > > > > ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- > > > > > Hi > > > > > > > > > > I have a forms that performs a calculation and shows the result, all > > > > done by > > > > > an ajax form. > > > > > > > > > > I have an ajax link that has to return a PDF, but also "refresh" the > > > > results > > > > > or execute the ajax form submit. > > > > > > > > > > Also if the form proces fails for a validation (eg. empty field) > > then I > > > > > should show the validation messages in my feedback panel, and do not > > > > process > > > > > de pdf for download. > > > > > > > > > > Anyone? > > > > > > > > > > thanks, > > > > > > > > > > f(t) > > > > > > > > > > > ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- > > > > > Is there any articles, Documentation Links? > > > > > > > > > > I know about DownloadLink, I don't know how to resolve the form > > submit, > > > > the > > > > > result label's refresh, and the canceling of the download if the > > form > > > > submit > > > > > fails. > > > > > > > > > > We have this working with decorators, but what the approach was to > > put a > > > > new > > > > > form with target new to have a submit of another form on a new page > > and > > > > have > > > > > that download the PDF version of the results that were calculated. > > > > > > > > > > I didn't think this approach look so neat, so I try to find > > information > > > > on > > > > > the list and on the web. I found Fanton's mail on the list but he > > didn't > > > > saw > > > > > the mail I sent him or didn't answer. > > > > > > > > > > So, although I have everything "working" I would like a better more > > > > wicket > > > > > like approach of solving this. > > > > > > > > > > It is a very simple scenario, a calculator form, submits via AJAX > > and > > > > has > > > > > some labels show the result. On the right side of the submit button > > > > there is > > > > > a link that says PDF Result, which needs to send the calculator the > > > > Input > > > > > Data and Calculate on a function that returns a pdf instead of a > > result > > > > map, > > > > > and then returned it to the browser, without replacing the current > > view. > > > > > > > > > > Thanks, > > > > > f(t) > > > > > > > > > > > > > > > On Nov 23, 2007 12:44 AM, Igor Vaynberg <[EMAIL PROTECTED]> > > wrote: > > > > > > > > > > > DownloadLink ? > > > > > > > > > > > > -igor > > > > > > > > > > > > > > > > > > On Nov 22, 2007 11:30 AM, Francisco Diaz Trepat - gmail > > > > > > <[EMAIL PROTECTED]> wrote: > > > > > > > Hi could someone guide me a bit on where can I find information > > on > > > > ways > > > > > > to > > > > > > > Download Files. > > > > > > > > > > > > > > Specially AJAX ways. > > > > > > > > > > > > > > Sorry to be so insistent (3rd mail) on the subject but I found > > it to > > > > be > > > > > > > difficult to research. > > > > > > > > > > > > > > Thanks, > > > > > > > > > > > > > > f(t) > > > > > > > > > > > > > > > > > > > > > --------------------------------------------------------------------- > > > > > > 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] > > > > > > > > > > > > > > > --------------------------------------------------------------------- > > 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]