On 12/21/05, Kieren Diment <[EMAIL PROTECTED]> wrote:
>
> 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.
>
>
The only good reason I noticed was it demonstrated more than one way
to do it. You can use to_cgi or use to_field . Perhaps someday
someone will release a different set of templates.
--
pjs
-------------------------------------------------------
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_idv37&alloc_id865&op=click
_______________________________________________
Maypole-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/maypole-devel