X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/f3978ea1c30d283b9d46be0766a33c568ade511c..6e1582b8d7511735d585d22680e94f7c1963105b:/SL/Controller/Base.pm diff --git a/SL/Controller/Base.pm b/SL/Controller/Base.pm index 01e2db4f0..876aac30f 100644 --- a/SL/Controller/Base.pm +++ b/SL/Controller/Base.pm @@ -60,6 +60,9 @@ sub render { my $template = shift; my ($options, %locals) = (@_ && ref($_[0])) ? @_ : ({ }, @_); + # Special handling/shortcut for an instance of SL::ClientJS: + return $self->render(\$template->to_json, { type => 'json' }) if ref($template) eq 'SL::ClientJS'; + # Set defaults for all available options. my %defaults = ( type => 'html', @@ -381,6 +384,11 @@ If C<$template> is a reference to a scalar then the referenced scalar's content is used as the content to process. The C option is not considered in this case. +C<$template> can also be an instance of L +or a reference to such an instance. Both of these cases are handled +the same way as if C<$template> were a reference to a scalar: its +content is processed, and C is not considered. + Other reference types, unknown options and unknown arguments to the C option cause the function to L.