Class: UU::OS::VUC::VisualUseCaseContext
- Inherits:
-
Application::UseCaseContext
- Object
- Application::UseCaseContext
- UU::OS::VUC::VisualUseCaseContext
- Defined in:
- uu_os_vuc-server-3.6.2/lib/uu/os/vuc/visual_use_case_context.rb
Overview
Visual use case used in controller implementation.
Defined Under Namespace
Classes: ParametersDecorator
Instance Attribute Summary
Attributes inherited from Application::UseCaseContext
Instance Method Summary (collapse)
-
- (UU::OS::VUC::Action) action
Returns object which is used for define action, action can be: * back - Returns to previous Use case * super uc - Execute super Use case instead of this one * forward - Navigate to another Use case * dialog - Open modal dialog * progress dialog - Open progress dialog * download - Creates action for launching download from client (browser).
-
- (Object) parameters
Returns reference to UU::OS::Lang::UniformHash instance which contains visual use case context parameters.
-
- (UU::OS::VUC::ViewModel) view
Returns object which is used for working with components and building common response.
Instance Method Details
- (UU::OS::VUC::Action) action
Returns object which is used for define action, action can be:
* back - Returns to previous Use case
* super uc - Execute super Use case instead of this one
* forward - Navigate to another Use case
* dialog - Open modal dialog
* progress dialog - Open progress dialog
* download - Creates action for launching download from client (browser).
49 50 51 |
# File 'uu_os_vuc-server-3.6.2/lib/uu/os/vuc/visual_use_case_context.rb', line 49 def action @action ||= UU::OS::VUC::Action.new(self) end |
- (Object) parameters
Returns reference to UU::OS::Lang::UniformHash instance which contains visual use case context parameters.
An external parameter can be hidden by setting a value to view attributes using the same attribute name.
Example:
extParam = ctx.parameters[:extParamName] # this will return value of external parameter
ctx.view[:extParamName] = anotherValue # this assignment will hide the original external parameter
This method allows to get value of an view model attribute, but it is not its primary purpose, therefore it is recommended to use ctx.view for this purpose.
65 66 67 |
# File 'uu_os_vuc-server-3.6.2/lib/uu/os/vuc/visual_use_case_context.rb', line 65 def parameters @paramDecorator ||= ParametersDecorator.new(self, super); end |
- (UU::OS::VUC::ViewModel) view
Returns object which is used for working with components and building common response. You can use this object if you want:
* work with components, get value, change component attribute etc.
* add user message
* change focused component
* change view template
* get component, which trigger action
* add custom attribute to be stored within actions
34 35 36 |
# File 'uu_os_vuc-server-3.6.2/lib/uu/os/vuc/visual_use_case_context.rb', line 34 def view @view_model ||= UU::OS::VUC::ViewModel.new(self) end |