Re: [Catalyst] Problem with RenderView

2007-05-07 Thread Matt S Trout
On Fri, May 04, 2007 at 12:34:01PM +0200, Bernhard Graf wrote: For a Catalyst application I have written View classes that serialize DBIC ResultSets to common formats (CSV, XML) to be stored to disc. Since the amount of data can become really big, the views don't set $c-response-body(),

Re: [Catalyst] Problem with RenderView

2007-05-07 Thread Matt S Trout
On Fri, May 04, 2007 at 04:24:12PM +0200, Bernhard Graf wrote: On Friday 04 May 2007 15:58, Bogdan Lucaciu wrote: On Friday 04 May 2007 16:53, Bernhard Graf wrote: First of all, why are you sending your response from the controller and not from the view? ??? I think you

Re: [Catalyst] Problem with RenderView

2007-05-07 Thread Bernhard Graf
Matt S Trout wrote: On Fri, May 04, 2007 at 04:24:12PM +0200, Bernhard Graf wrote: On Friday 04 May 2007 15:58, Bogdan Lucaciu wrote: Your example is superfluous, because this is what my application looks like basically. I think you didn't read the documentation, and are being offensive

Re: [Catalyst] Problem with RenderView

2007-05-07 Thread Bernhard Graf
Matt S Trout wrote: Why can't you just set $c-stash(current_view = 'MyCSVView') and let RenderView work its magic the normal way? With the help of some helpful people I already came to this solution. -- Bernhard Graf ___ List:

Re: [Catalyst] Problem with RenderView

2007-05-07 Thread Matt S Trout
On Mon, May 07, 2007 at 11:31:29PM +0200, Bernhard Graf wrote: Matt S Trout wrote: On Fri, May 04, 2007 at 04:24:12PM +0200, Bernhard Graf wrote: On Friday 04 May 2007 15:58, Bogdan Lucaciu wrote: Your example is superfluous, because this is what my application looks like

Re: [Catalyst] Problem with RenderView

2007-05-04 Thread Bogdan Lucaciu
On Friday 04 May 2007 13:34, Bernhard Graf wrote: For a Catalyst application I have written View classes that serialize DBIC ResultSets to common formats (CSV, XML) to be stored to disc. Since the amount of data can become really big, the views don't set $c-response-body(), but write the data

Re: [Catalyst] Problem with RenderView

2007-05-04 Thread Bernhard Graf
On Friday 04 May 2007 15:41, Bogdan Lucaciu wrote: On Friday 04 May 2007 13:34, Bernhard Graf wrote: For a Catalyst application I have written View classes that serialize DBIC ResultSets to common formats (CSV, XML) to be stored to disc. [...] First of all, why are you sending your

Re: [Catalyst] Problem with RenderView

2007-05-04 Thread Bogdan Lucaciu
On Friday 04 May 2007 16:53, Bernhard Graf wrote: First of all, why are you sending your response from the controller and not from the view? ??? I think you deleted the example. RenderView doesn't use a default view, it uses $c-view(); You can read about it here:

Re: [Catalyst] Problem with RenderView

2007-05-04 Thread Wade . Stuart
Bernhard Graf [EMAIL PROTECTED] wrote on 05/04/2007 09:24:12 AM: On Friday 04 May 2007 15:58, Bogdan Lucaciu wrote: On Friday 04 May 2007 16:53, Bernhard Graf wrote: First of all, why are you sending your response from the controller and not from the view? ??? I think

Re: [Catalyst] Problem with RenderView

2007-05-04 Thread Jay K
Bernhard, There is no way that I'm aware of to accomplish what you are trying to do in the manner you are trying to do it. RenderView basically forwards processing to your view object. It has some 'outs' to avoid doing that when it is inappropriate, as in when body is filled out or you are

Re: [Catalyst] Problem with RenderView

2007-05-04 Thread Christopher H. Laco
Jay K wrote: Bernhard, There is no way that I'm aware of to accomplish what you are trying to do in the manner you are trying to do it. RenderView basically forwards processing to your view object. It has some 'outs' to avoid doing that when it is inappropriate, as in when body is

Re: [Catalyst] Problem with RenderView

2007-05-04 Thread Bernhard Graf
On Friday 04 May 2007 16:59, Jay K wrote: RenderView basically forwards processing to your view object. It has some 'outs' to avoid doing that when it is inappropriate, as in when body is filled out or you are redirecting, etc. But there is no 'just don't do it' flag. That's why I added

Re: [Catalyst] Problem with RenderView

2007-05-04 Thread Wade . Stuart
Bernhard Graf [EMAIL PROTECTED] wrote on 05/04/2007 10:04:30 AM: On Friday 04 May 2007 16:41, [EMAIL PROTECTED] wrote: why write()? I thought Cat does this behind the scenes if you pass $c-res-body($fh); #filehandle There is no filehandle I could easily pass to $c-res-body(),

Re: [Catalyst] Problem with RenderView

2007-05-04 Thread Jay K
Well, mostly. The REST Action stuff doesn't use views at all by default. So, it's happy writing output and not going to a view at all (unless you map a content-type to a View manually) As such, what is the REST stuff doing, or how is it avoiding using views for most of it's output? Therein

Re: [Catalyst] Problem with RenderView

2007-05-04 Thread Bogdan Lucaciu
On Friday 04 May 2007 18:24, Bernhard Graf wrote: Bingo! I wasn't aware of this current_view variable. Well I told you about it in my first mail. And my second. Ignored it , twice. -- Bogdan Lucaciu http://www.wiz.ro ___ List:

Re: [Catalyst] Problem with RenderView

2007-05-04 Thread Bernhard Graf
On Friday 04 May 2007 17:55, Bogdan Lucaciu wrote: On Friday 04 May 2007 18:24, Bernhard Graf wrote: Bingo! I wasn't aware of this current_view variable. Well I told you about it in my first mail. And my second. Ignored it , twice. Indeed, sorry. I just didn't notice, because in your

Re: [Catalyst] Problem with RenderView

2007-05-04 Thread Adam Jacob
On Fri, May 04, 2007 at 11:05:07AM -0400, Christopher H. Laco wrote: What Bogdan was trying to tell you is that while, yes, your code does do the write, doing it inside your controller is somewhat against the MVC method generally used in Catalyst. Which means, essentially, that you are