Sha256: ec91491da8e72d2259cadcc35d1063f8562b743d88ec6ab4590f938cd2aa5269

Contents?: true

Size: 753 Bytes

Versions: 11

Compression:

Stored size: 753 Bytes

Contents

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}});
    #
    class DynamicTabPanel < Netzke::Base
      js_configure 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
      end
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
netzke-basepack-0.12.9 lib/netzke/basepack/dynamic_tab_panel.rb
netzke-basepack-0.12.8 lib/netzke/basepack/dynamic_tab_panel.rb
netzke-basepack-0.12.7 lib/netzke/basepack/dynamic_tab_panel.rb
netzke-basepack-0.12.6 lib/netzke/basepack/dynamic_tab_panel.rb
netzke-basepack-0.12.5 lib/netzke/basepack/dynamic_tab_panel.rb
netzke-basepack-0.12.4 lib/netzke/basepack/dynamic_tab_panel.rb
netzke-basepack-0.12.3 lib/netzke/basepack/dynamic_tab_panel.rb
netzke-basepack-0.12.2 lib/netzke/basepack/dynamic_tab_panel.rb
netzke-basepack-0.12.1 lib/netzke/basepack/dynamic_tab_panel.rb
netzke-basepack-0.12.0 lib/netzke/basepack/dynamic_tab_panel.rb
netzke-basepack-0.12.0.rc1 lib/netzke/basepack/dynamic_tab_panel.rb