Class: UU::OS::GVC::UxmlFragment
- Inherits:
-
Component
- Object
- Component
- UU::OS::GVC::UxmlFragment
- Defined in:
- uu_os_gvc-0.28.16/lib/uu/os/gvc/uxmlfragment.rb
Overview
Uxmlfragment component. This component is meant for creating dynamic views by supplying fragments of UXML (can contain other gvc components, but is restrictive for other uxml elements, see documentation). Documentation at: ues:UNI-BT:UES.DOC/EDITOR_V1/uu.os.gvc.uxmlfragment
Instance Attribute Summary (collapse)
-
- (Object) data
Use this to set a fragment of UXML code (only String) you want to render.
-
- (Object) data_uri
readonly
Attribute containing uri of the fragment component's datasource (should be valid UXML).
Attributes inherited from Component
#attributes, #code, #component_type, #form, #height, #id, #name, #width
Method Summary
Methods inherited from Component
#add_message, #focus, #messages
Instance Attribute Details
- (Object) data
Use this to set a fragment of UXML code (only String) you want to render. The UXML has to be valid and contain only allowed elements (see ues:UNI-BT:UES.DOC/EDITOR_V1/uu.os.gvc.uxmlfragment). The UXML doesnt need to have one root element containing everything - this the only exception to what should a well-formed XML look like. You can retrieve the UXML back using this accessor but only within the scope of the same event in which the UXML was set. When handling another event in your controller, you wont be able to retrieve UXML from previous events, because for traffic-saving reasons its not being sent as a part of the controller's viewmodel. If you wish to keep the state of your UXML between events it is advised not to entirely circumvent this limitation by manually putting your UXML back into the viewmodel as a custom attribute (anti-pattern!), but rather to use a templating engine (erb and the like) to keep the bulk of the uxml as a template - a stateless resource that then understandably doesnt need to be a part of the viewmodel and keep only the necessary pieces of data, that define the state and populate the template, in the viewmodel.
26 27 28 |
# File 'uu_os_gvc-0.28.16/lib/uu/os/gvc/uxmlfragment.rb', line 26 def data @data end |
- (Object) data_uri (readonly)
Attribute containing uri of the fragment component's datasource (should be valid UXML). It can be set only by editing the containing sheet's content.
30 31 32 |
# File 'uu_os_gvc-0.28.16/lib/uu/os/gvc/uxmlfragment.rb', line 30 def data_uri @data_uri end |