[cgiapp] Turning off Template output for AJAX

2009-01-29 Thread kropotkin
Hi How do I stop C:A outputting a template from a run-mode? This is for a method which serves an AJAX call. Thanks Kropotkin -- View this message in context: http://www.nabble.com/Turning-off-Template-output-for-AJAX-tp21726620p21726620.html Sent from the cgiapp@lists.erlbaum.net mailing

Re: [cgiapp] Turning off Template output for AJAX

2009-01-29 Thread Michael Peters
kropotkin wrote: How do I stop C:A outputting a template from a run-mode? This is for a method which serves an AJAX call. C::A doesn't output a template by default. You must have some other plugin loaded that does that. Besides, what does an AJAX call have to do with not using a template?

Re: [cgiapp] Turning off Template output for AJAX

2009-01-29 Thread kropotkin
Hi I see - yes; I found the place in postrun where we are loading the layout template and I just turn it off. I suppose you could use a template for AJAX but since the body is no more than the AJAX response text I'm not sure I can see the point Thanks for the helpful response Kroptokin

Re: [cgiapp] Turning off Template output for AJAX

2009-01-29 Thread P Kishor
On 1/29/09, kropotkin enquir...@mms-oxford.com wrote: Hi I see - yes; I found the place in postrun where we are loading the layout template and I just turn it off. I suppose you could use a template for AJAX but since the body is no more than the AJAX response text I'm not sure I can

Re: [cgiapp] Turning off Template output for AJAX

2009-01-29 Thread Michael Peters
kropotkin wrote: I see - yes; I found the place in postrun where we are loading the layout template and I just turn it off. I suppose you could use a template for AJAX but since the body is no more than the AJAX response text I'm not sure I can see the point It depends on how complicated the

Re: [cgiapp] Turning off Template output for AJAX

2009-01-29 Thread kropotkin
lol Alright. I take the point that it is consistent design wise - but I am outputting JSON so a template isn't really necessary in this case. But does the C:A JSON plugin require me to be using a template? Thanks Kropotkin P Kishor-3 wrote: On 1/29/09, kropotkin enquir...@mms-oxford.com

Re: [cgiapp] Turning off Template output for AJAX

2009-01-29 Thread Michael Peters
kropotkin wrote: Alright. I take the point that it is consistent design wise - but I am outputting JSON so a template isn't really necessary in this case. You're right, JSON doesn't need a template. HTML, Text and sometimes XML are good use cases for templates. But does the C:A JSON

Re: [cgiapp] Turning off Template output for AJAX

2009-01-29 Thread fREW Schmidt
On Thu, Jan 29, 2009 at 10:06 AM, kropotkin enquir...@mms-oxford.comwrote: lol Alright. I take the point that it is consistent design wise - but I am outputting JSON so a template isn't really necessary in this case. But does the C:A JSON plugin require me to be using a template? Thanks

Re: [cgiapp] Turning off Template output for AJAX

2009-01-29 Thread kropotkin
Hi fRew I went for a simple solution. Our template is added in the postrun filter. I set a property of the object to be 'ajax' rather than 'browser' in the class and in post_run I just bail out if this property is 'ajax', not outputting a template Thanks Justin Frew Schmidt wrote: On