On 22 Dec 2005, at 12:14, Kieren Diment wrote:


On 22 Dec 2005, at 12:00, Peter Speltz wrote:

On 12/21/05, Kieren Diment <[EMAIL PROTECTED]> wrote:



That is right. Maypole::View::Base, or whatever has the vars sub in it
:)  , does not ever call to_cgi with the object i do not think. You
have to do that yourself. In your "edit"  method you could do
something like this:

sub edit : Exported {
    my ($self, $r, $obj) = @_;
    # handle edit called without an object arg
return $r->error("You need an object to edit interface buster. " )
 unless $obj;
    $r->template_args->{classmetadata}{cgi} = $obj->to_cgi;
 }


Is there a good reason that this shouldn't be the default behaviour? It seems strange to have to override a method for the sake of it.


I suppose my comment is also along the lines that the default templates are a learning tool. So picking them apart and applying them to a less general solution is a valid activity and should be easy to do.


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
Maypole-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/maypole-devel

Reply via email to