Yes, I may have hijacked my own thread ;-).
Yes, I wanted to do parameterized/using flash persisted session variables. Use case being: first do query/search for a term using HTML interface to a database, then print the result rendered also in PDF format using a button/link. But realized that I could not even print "Hello World" using tapestry - (without HTML tags) - let alone create a fancy custom PDF! That is how this got started... On Wednesday, September 3, 2014 11:12 AM, Thiago H de Paula Figueiredo <thiag...@gmail.com> wrote: On Wed, 03 Sep 2014 17:44:20 -0300, Net Dawg <net.d...@yahoo.com.invalid> wrote: > Well, the thread is still open ;-). Hopefully the tapestry framework > developers will see the "parameterized" streaming pattern to be equally > important as HTML (and not some sort of hack/gimmick that needs, as you > put it, to "abort the goodness"). I'm sorry, Net Dawg, but I really don't get what you're saying in this thread. For me, a simple Hello World in Tapestry would be this: public class HelloWorld { } <html> <head> </head> <body> <p>Hello, World!</p> </body> </html> If you're generating HTML, in Tapestry the usual method is using a template. Regarding what you call parameterized streaming pattern, that's not a Hello World anymore, and "Simpler Hello World" is the title of the thread you've created. >> Thanks Chris. The intent of this question was to get a start toward >> streaming "pure content" - not just text, but also (and especially PDF), >> XML, imagery - whatever - anything except HTML. My solution finally >> was to mimic a previously coded button press on an HTML page. Why? >> Because that> is where I get all the session variables set (search, >> query etc) to >> properly construct the PDF content. 1) What do you mean by session variables? 2) If you want to use a button, you can. Just use the Form component: <t:form t:id="pdf"> <!-- Any form fields you'd want, if any. --> <input type="submit" value="Generate PDF"/> </t:form> StreamResponse onSuccessFromPdf() { StreamResponse response = ...; return response; } >> Then I hid the button and launched >> the "pure content" page as a pagelink, instead, as follows: >> >> <t:pagelink page="pdf/Index" target="_blank">PDF</t:pagelink> You can also return StreamResponse in Tapestry event handlers just like you do in onActivate(). >> Rather convoluted, but gets the job done....and, yes, hardly a simpler >> hello world now...(this workaround would be more useful to say "Hello >> Chris" - after, say, selecting from an HTML list of users) My concept of Hello World, which is probably the same most people have, is to just output "Hello, World!" using the tool of your choice. If you parameterize it, it's not a Hello World anymore. -- Thiago H. de Paula Figueiredo Tapestry, Java and Hibernate consultant and developer http://machina.com.br --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org