Module: Netzke::Core::Embedding

Included in:
Base
Defined in:
lib/netzke/core/embedding.rb

Overview

The following methods are used when a component is generated stand-alone (as a part of a HTML page)

Instance Method Summary collapse

Instance Method Details

#js_component_htmlObject

Container for rendering



15
16
17
# File 'lib/netzke/core/embedding.rb', line 15

def js_component_html
  %Q{<div id="#{name.to_s.split('_').join('-')}-netzke" class="netzke-component"></div>}
end

#js_component_instanceObject

Instantiating



5
6
7
# File 'lib/netzke/core/embedding.rb', line 5

def js_component_instance
  %Q{Netzke.page.#{name.to_s.camelize(:lower)} = Ext.create("#{self.class.client_class_config.class_alias}", #{js_config.netzke_jsonify.to_json});}
end

#js_component_renderObject

Rendering



10
11
12
# File 'lib/netzke/core/embedding.rb', line 10

def js_component_render
  %Q{Netzke.page.#{name.to_s.camelize(:lower)}.render("#{name.to_s.split('_').join('-')}-netzke");} unless self.class.client_class_config.xtype == "netzkewindow"
end