Netzke::Base
Ext.form.FormPanel-based component with different goodies
Besides all the standard Ext.form.FormPanel config options, accepts:
model - name of the ActiveRecord model that provides data to this GridPanel.
record - record to be displayd in the form. Takes precedence over :record_id
record_id - id of the record to be displayd in the form. Also see :record
mode - render mode, accepted options:
lockable - makes the form panel load initially in “display mode”, then lets “unlock” it, change the values, and “lock” it again, while updating the values on the server
updateMask - Ext.LoadMask config options for the mask shown while the form is submitting its values
The layout of the form is configured by supplying the item config option, same way it would be configured in Ext (thus allowing for complex form layouts). FormPanel will expand fields by looking at their names (unless no_binding set to true is specified for a specific field).
# File lib/netzke/basepack/form_panel.rb, line 93
93: def self.property_fields
94: res = [
95: # {:name => "ext_config__title", :attr_type => :string},
96: # {:name => "ext_config__header", :attr_type => :boolean, :default => true},
97: # {:name => "ext_config__bbar", :attr_type => :json}
98: ]
99:
100: res
101: end
# File lib/netzke/basepack/form_panel.rb, line 36
36: def bbar(config)
37: config[:mode] == :lockable ? nil : [:apply.action]
38: end
# File lib/netzke/basepack/form_panel.rb, line 44
44: def configuration
45: sup = super
46:
47: sup.merge(
48: :bbar => sup[:bbar] || bbar(sup),
49: :locked => sup[:locked].nil? ? (sup[:mode] == :lockable) : sup[:locked]
50: )
51: end
# File lib/netzke/basepack/form_panel.rb, line 72
72: def configuration_components
73: res = []
74:
75: res << {
76: :name => 'fields',
77: :class_name => "FieldsConfigurator",
78: :active => true,
79: :owner => self,
80: :persistent_config => true
81: }
82:
83: res << {
84: :name => 'general',
85: :class_name => "PropertyEditor",
86: :component => self,
87: :title => false
88: }
89:
90: res
91: end
Netzke::Base.config[:ext_location] + “/examples/ux/fileuploadfield/FileUploadField.js“, “#{File.dirname(FILE)}/form_panel/javascripts/netzkefileupload.js“
# File lib/netzke/basepack/form_panel.rb, line 62
62: def js_config
63: super.merge(
64: :pri => data_class && data_class.primary_key
65: )
66: end
Disabled; run with --debug to generate this.
Generated with the Darkfish Rdoc Generator 1.1.6.