Class: UU::OS::VUC::ViewTemplate
- Inherits:
-
Object
- Object
- UU::OS::VUC::ViewTemplate
- Defined in:
- uu_adk-0.28.16/lib/uu/os/vuc/view_template.rb
Overview
View template that can be used for setting custom view.
Instance Attribute Summary (collapse)
-
- (String) data_uri
UESURI of sheet that will be used as form template.
Instance Method Summary (collapse)
-
- (ViewTemplate) initialize(data = nil)
constructor
A new instance of ViewTemplate.
Constructor Details
- (ViewTemplate) initialize(data = nil)
Returns a new instance of ViewTemplate
47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 |
# File 'uu_adk-0.28.16/lib/uu/os/vuc/view_template.rb', line 47 def initialize(data = nil) if data.nil? @raw_attrs = {} return end if data.kind_of?String data = JSON.parse(data, :symbolize_names => true) end if data.kind_of?Hash @raw_attrs = data elsif data.kind_of?ViewTemplate if data.raw_attrs @raw_attrs = data.raw_attrs else @raw_attrs = {} end else raise ArgumentError.new("ViewTemplate data must be JSON String or Hash, but was #{data.class}.") end end |
Instance Attribute Details
- (String) data_uri
Note:
This parameters can be set only in on_before_init method, if you set data_uri in another method, it will have no effect.
UESURI of sheet that will be used as form template. Default value is the main sheet of registered VUC. You can use sheets from this VUC only, it's means that only sheets related to VUC artifact (from parameter context.use_case_realization_uri) are allowed, otherwise form execution fails with error. If you set non-exists uri than form execution will fail as well.
44 45 46 |
# File 'uu_adk-0.28.16/lib/uu/os/vuc/view_template.rb', line 44 def data_uri @data_uri end |