Class: UU::OS::VUC::VisualUseCaseController
- Inherits:
-
Application::AbstractController
- Object
- Server::AbstractServlet
- Application::AbstractController
- UU::OS::VUC::VisualUseCaseController
- Defined in:
- uu_os_vuc-server-3.6.2/lib/uu/os/vuc/visual_use_case_controller.rb
Overview
Ancestor for development of custom Visual Use Case controllers v3
Instance Method Summary (collapse)
-
- (Object?) on_before_init(ctx)
Method used for business rule check and changing view template.
-
- (Object?) on_cancel(ctx)
Method used for handling cancel actions.
-
- (Object?) on_dialog_closed(ctx)
Callback method for processing dialog result.
-
- (Object?) on_init(ctx)
Method used for filling initial values to components.
-
- (Object?) on_submit(ctx)
Method used for process result of this use case, usually ands up with navigation.
-
- (Object?) on_value_change(ctx)
Method used for handling component changes.
Methods included from Util::ResponseBuilder
#handle_response, #response, #streamed_response
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
- (Object) method_missing(method, *args, &block)
Controller need not to implement all possible event methods. This method provides default behavior of all unimplemented events.
201 202 203 204 205 206 207 208 209 210 211 |
# File 'uu_os_vuc-server-3.6.2/lib/uu/os/vuc/visual_use_case_controller.rb', line 201 def method_missing(method, *args, &block) # :nodoc: # Do not touch view in case of unimplemented event with exception # of submit event which must be always implemented. if (method == :on_submit) raise "Controller #{self.class} does not define on_submit method." elsif (method.to_s[/^on_/] == nil) || (args.size != 1) # Invoked method was not "event" method with view parameter - throw regular method missing exception. raise NameError.new("undefined local variable or method '#{method.to_s}' for #{self.class}") end return nil end |
Instance Method Details
- (Object?) on_before_init(ctx)
No components are available here. Components are available from #on_init method on.
Method used for business rule check and changing view template. E.g. artifact exists, user is casted to role etc.
61 62 63 |
# File 'uu_os_vuc-server-3.6.2/lib/uu/os/vuc/visual_use_case_controller.rb', line 61 def on_before_init(ctx) return ctx.view; end |
- (Object?) on_cancel(ctx)
Method used for handling cancel actions.
167 168 |
# File 'uu_os_vuc-server-3.6.2/lib/uu/os/vuc/visual_use_case_controller.rb', line 167 def on_cancel(ctx) end |
- (Object?) on_dialog_closed(ctx)
Callback method for processing dialog result. If dialog set result, it is available in reserved parameter 'uuResult'
194 195 |
# File 'uu_os_vuc-server-3.6.2/lib/uu/os/vuc/visual_use_case_controller.rb', line 194 def on_dialog_closed(ctx) end |
- (Object?) on_init(ctx)
Method used for filling initial values to components. E.g. acquired from Object Store. All components are available here now.
91 92 93 |
# File 'uu_os_vuc-server-3.6.2/lib/uu/os/vuc/visual_use_case_controller.rb', line 91 def on_init(ctx) return ctx.view; end |
- (Object?) on_submit(ctx)
Method used for process result of this use case, usually ands up with navigation.
157 158 |
# File 'uu_os_vuc-server-3.6.2/lib/uu/os/vuc/visual_use_case_controller.rb', line 157 def on_submit(ctx) end |
- (Object?) on_value_change(ctx)
Method used for handling component changes.
119 120 |
# File 'uu_os_vuc-server-3.6.2/lib/uu/os/vuc/visual_use_case_controller.rb', line 119 def on_value_change(ctx) end |