ClientJS: controller default auf leeren Controller
[kivitendo-erp.git] / SL / ClientJS.pm
index 335bf81..91c9e1a 100644 (file)
@@ -9,8 +9,8 @@ use SL::JSON ();
 
 use Rose::Object::MakeMethods::Generic
 (
-  scalar                  => [ qw(controller) ],
-  'scalar --get_set_init' => [ qw(_actions _flash _error) ],
+  scalar                  => [ qw() ],
+  'scalar --get_set_init' => [ qw(controller _actions _flash _error) ],
 );
 
 my %supported_methods = (
@@ -244,6 +244,12 @@ sub error {
   return $self;
 }
 
+sub init_controller {
+  # fallback
+  require SL::Controller::Base;
+  SL::Controller::Base->new;
+}
+
 1;
 __END__