Re: Readable HTML output

2012-04-03 Thread Chris Mylonas
Hi Thaigo, oh yeah good point. i associate firebug with css only really from my drupal days. i was going to get onto that next now that i've sorted out my asset:context:layout/images/email.png stuff. i have a several plugins in firefox for privacy and no tracking that most of the b.s. interne

Re: Readable HTML output

2012-04-03 Thread Thiago H. de Paula Figueiredo
On Tue, 03 Apr 2012 06:23:28 -0300, Chris Mylonas wrote: Hi Tap List, Hi! I've got production mode set to false and the parts of the html document that I haven't created come out quite nicely. The parts I have rendered in my component (below) are coming out on one line. It's the eye-s

Re: Readable HTML output

2012-04-03 Thread trsvax
I have not tried to use MarkupWriter to generate a CSV but I do return CSVs with StreamResponse. I usually use StreamReponse for XML also but sometimes it's more work than necessary. For example if you just want something like OK MarkupWriter is much easier than either StreamResponse or a .tml fi

Re: Readable HTML output

2012-04-03 Thread Lance Java
Nope, it must be XML as MarkupWriter is backed by a DOM. Consider a tempting language such as Freemarker and a StreamResponse for non-XML text formats On Tuesday, 3 April 2012, Chris Mylonas wrote: > wow! coolso you could essentially respond with csv files as well? > > On 03/04/2012, at 8:11

Re: Readable HTML output

2012-04-03 Thread Chris Mylonas
I like the .tml approach better so far by a mile. I can see it easily and it's not too much brain work to get it onto "paper" so to speak. On 03/04/2012, at 8:12 PM, Lance Java wrote: > I would still use .tml to generate XML. Tapestry is tied to http, it is > implemented as a http request filt

Re: Readable HTML output

2012-04-03 Thread Chris Mylonas
wow! coolso you could essentially respond with csv files as well? On 03/04/2012, at 8:11 PM, trsvax wrote: > It works fine for generating XML. I have many rest style web services that > are really Tapestry pages, but I have not tried to put at > the top of the document. I think that might be

Re: Readable HTML output

2012-04-03 Thread Lance Java
I would still use .tml to generate XML. Tapestry is tied to http, it is implemented as a http request filter. The only way to use tapestry without http is using tapx-templating, even then you would still probably choose .tml for generating XML On Tuesday, 3 April 2012, Chris Mylonas wrote: > I g

Re: Readable HTML output

2012-04-03 Thread trsvax
It works fine for generating XML. I have many rest style web services that are really Tapestry pages, but I have not tried to put at the top of the document. I think that might be tricky but doable one way or another. -- View this message in context: http://tapestry.1045711.n5.nabble.com/Readabl

Re: Readable HTML output

2012-04-03 Thread Chris Mylonas
I guess the MarkupWriter comes in handy for generating XML documents as well does tapestry allow the output of say, That would come in handy for submitting xml documents to other services without HTTP. On 03/04/2012, at 7:54 PM, Lance Java wrote: > I always favour .tml for generating mar

Re: Readable HTML output

2012-04-03 Thread Chris Mylonas
Hmmm .tml fragments for the components seems to be the way to go for me in this instance, I'll look further down this track. I've already knocked up most of the html/css/js from some prototyping the UI last year - I'd rather just keep it XML-like rather than do it in code for this particula

Re: Readable HTML output

2012-04-03 Thread Lance Java
I always favour .tml for generating markup. The MarkupWriter gives you complete control but in this case, I think that .tml would suit your use case better On Tuesday, 3 April 2012, Lance Java wrote: > This should work: > > private static final String NEWLINE = System.getProperty("line.separator

Re: Readable HTML output

2012-04-03 Thread Chris Mylonas
Thanks Lance, but not quite what I'm after. It's only given new lines but no indentation (which I presume will disappear in production mode) It's made my code look a bit ugly. Maybe I should look at a .tml file set up. writer.element("div", "class", "userbackground");

Re: Readable HTML output

2012-04-03 Thread Lance Java
This should work: private static final String NEWLINE = System.getProperty("line.separator"); ... writer.element("div", "class", "userbackground"); writer.writeRaw(NEWLINE); writer.element("div","id",currentPhone.getNumber(), "class","user"); ... On Tuesday, 3 April 2012, Chris Mylonas wrote: >