Class: UU::OS::GVC::DropDownButton
Overview
Drop-down button component.
Instance Attribute Summary (collapse)
-
- (UU::OS::GVC::MenuModel) data
Represents the menu of the dropdown button.
-
- (Object) data_uri
readonly
The URI to get the menu model data from.
Attributes inherited from Button
#action_uri, #disabled, #icon_uri, #max_width, #min_width, #target, #text, #tooltip
Attributes included from Styleable
Attributes inherited from Component
#attributes, #code, #component_type, #form, #height, #id, #name, #width
Instance Method Summary (collapse)
-
- (DropDownButton) initialize(container, data = nil)
constructor
Creates new instance of DropDownButton component.
Methods included from Styleable
#add_style_class, #remove_style_class
Methods inherited from Component
#add_message, #focus, #messages
Constructor Details
- (DropDownButton) initialize(container, data = nil)
Creates new instance of DropDownButton component.
47 48 49 50 51 52 53 |
# File 'uu_os_gvc-0.28.16/lib/uu/os/gvc/drop_down_button.rb', line 47 def initialize(container, data = nil) super(container, data) json_data = attributes[:data] if !json_data.kind_of? MenuModel attributes[:data] = MenuModel.new(json_data) end end |
Instance Attribute Details
- (UU::OS::GVC::MenuModel) data
Represents the menu of the dropdown button. It's possible to add, insert or remove items from the model.
36 37 38 |
# File 'uu_os_gvc-0.28.16/lib/uu/os/gvc/drop_down_button.rb', line 36 def data @data end |
- (Object) data_uri (readonly)
The URI to get the menu model data from. The component does not automatically load this URI. If it's required to access / modify MenuModel stored in this URI, it must be done by the developer that uses this component.
41 42 43 |
# File 'uu_os_gvc-0.28.16/lib/uu/os/gvc/drop_down_button.rb', line 41 def data_uri @data_uri end |