lib/netzke/basepack/dynamic_tab_panel.rb in netzke-basepack-0.12.9 vs lib/netzke/basepack/dynamic_tab_panel.rb in netzke-basepack-1.0.0.0.pre

- old
+ new

@@ -1,22 +1,20 @@ module Netzke module Basepack # A tab panel that can load components dynamically by their class name. Components can be loaded in the current or new tab. # For example: # - # this.netzkeLoadComponentByClass('BookGrid', {newTab: true, clientConfig: {read_only: true}}); + # this.netzkeLoadComponentByClass('BookGrid', {newTab: true, serverConfig: {read_only: true}}); # class DynamicTabPanel < Netzke::Base - js_configure do |c| + client_class do |c| c.extend = "Ext.tab.Panel" - c.mixin end # Override this method if you need more control on what components can/cannot be loaded, or in order to access # `client_config` component :child do |c| - # c.client_config <== is accessible here - c.klass = (c.client_config[:klass] || "Netzke::Core::Panel").constantize + c.class_name = c.client_config[:class_name] || "Netzke::Core::Panel" end end end end