Class: Netzke::Wrapper
- Inherits:
-
Base
- Object
- Base
- Netzke::Wrapper
- Defined in:
- lib/netzke/wrapper.rb
Overview
Wrapper
Simple Ext.Panel with layout ‘fit’ that wraps up another Netzke widget. Can be useful in HTML pages where a widget should be dynamically configured, to not reload the entire page after configuration (Wrapper will reload the widget automatically).
Configuration
-
:item
- configuration hash for wrapped widget
Example:
netzke :wrapper, :item => {
:widget_class_name => "FormPanel",
:data_class_name => "User"
}
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.js_extend_properties ⇒ Object
18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 |
# File 'lib/netzke/wrapper.rb', line 18 def self.js_extend_properties super.merge({ :layout => 'fit', # invisible :header => false, :border => false, :init_component => <<-END_OF_JAVASCRIPT.l, function(){ Ext.netzke.cache.#{}.superclass.initComponent.call(this); // instantiate the item this.instantiateChild(this.itemConfig); } END_OF_JAVASCRIPT }) end |
Instance Method Details
#initial_aggregatees ⇒ Object
37 38 39 |
# File 'lib/netzke/wrapper.rb', line 37 def initial_aggregatees {:item => config[:item]} end |