X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/e6535205268abb2fe58855f627a41ae389e7c509..4d9d7d51900ba9fc5690e4ac11c18f524eba6969:/SL/ClientJS.pm diff --git a/SL/ClientJS.pm b/SL/ClientJS.pm index 47f8a225b..4a0080fc5 100644 --- a/SL/ClientJS.pm +++ b/SL/ClientJS.pm @@ -98,6 +98,11 @@ sub to_array { return $self->_actions; } +sub render { + my ($self, $controller) = @_; + return $controller->render(\$self->to_json, { type => 'json' }); +} + 1; __END__ @@ -198,6 +203,13 @@ are the function parameters. Returns the actions gathered so far as a JSON string ready to be sent to the client. +=item C + +Renders C<$self> via the controller. Useful for chaining. Equivalent +to the following: + + $controller->render(\$self->to_json, { type => 'json' }); + =back =head1 FUNCTIONS EVALUATED ON THE CLIENT SIDE