netzke-basepack 0.5.8 → 0.5.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (62) hide show
  1. data/CHANGELOG.rdoc +18 -0
  2. data/README.rdoc +11 -4
  3. data/Rakefile +19 -3
  4. data/TODO.rdoc +1 -1
  5. data/generators/netzke_basepack/netzke_basepack_generator.rb +13 -0
  6. data/generators/netzke_basepack/templates/create_netzke_field_lists.rb +18 -0
  7. data/generators/netzke_basepack/templates/public_assets/ts-checkbox.gif +0 -0
  8. data/install.rb +1 -1
  9. data/javascripts/basepack.js +124 -30
  10. data/lib/app/models/netzke_field_list.rb +261 -0
  11. data/lib/app/models/netzke_model_attr_list.rb +21 -0
  12. data/lib/app/models/netzke_persistent_array_auto_model.rb +58 -0
  13. data/lib/netzke-basepack.rb +17 -2
  14. data/lib/netzke/active_record.rb +10 -0
  15. data/lib/netzke/active_record/association_attributes.rb +102 -0
  16. data/lib/netzke/active_record/attributes.rb +100 -0
  17. data/lib/netzke/active_record/combobox_options.rb +43 -0
  18. data/lib/netzke/active_record/data_accessor.rb +9 -12
  19. data/lib/netzke/attributes_configurator.rb +195 -0
  20. data/lib/netzke/basic_app.rb +47 -4
  21. data/lib/netzke/configuration_panel.rb +1 -1
  22. data/lib/netzke/data_accessor.rb +7 -30
  23. data/lib/netzke/fields_configurator.rb +106 -41
  24. data/lib/netzke/form_panel.rb +28 -125
  25. data/lib/netzke/form_panel/form_panel_api.rb +2 -3
  26. data/lib/netzke/form_panel/form_panel_fields.rb +147 -0
  27. data/lib/netzke/form_panel/form_panel_js.rb +35 -15
  28. data/lib/netzke/grid_panel.rb +130 -213
  29. data/lib/netzke/grid_panel/grid_panel_api.rb +254 -257
  30. data/lib/netzke/grid_panel/grid_panel_columns.rb +226 -0
  31. data/lib/netzke/grid_panel/grid_panel_js.rb +126 -119
  32. data/lib/netzke/grid_panel/record_form_window.rb +7 -1
  33. data/lib/netzke/json_array_editor.rb +61 -0
  34. data/lib/netzke/plugins/configuration_tool.rb +1 -1
  35. data/lib/netzke/property_editor.rb +3 -3
  36. data/lib/netzke/search_panel.rb +164 -27
  37. data/lib/netzke/tab_panel.rb +14 -12
  38. data/stylesheets/basepack.css +43 -2
  39. data/test/app_root/app/models/book.rb +1 -1
  40. data/test/app_root/app/models/role.rb +3 -0
  41. data/test/app_root/app/models/user.rb +3 -0
  42. data/test/app_root/config/database.yml +1 -1
  43. data/test/app_root/db/migrate/20090102223630_create_netzke_field_lists.rb +18 -0
  44. data/test/app_root/db/migrate/20090423214303_create_roles.rb +11 -0
  45. data/test/app_root/db/migrate/20090423222114_create_users.rb +12 -0
  46. data/test/fixtures/books.yml +4 -2
  47. data/test/fixtures/categories.yml +2 -2
  48. data/test/fixtures/genres.yml +6 -6
  49. data/test/fixtures/roles.yml +8 -0
  50. data/test/fixtures/users.yml +11 -0
  51. data/test/test_helper.rb +2 -0
  52. data/test/unit/active_record_basepack_test.rb +2 -2
  53. data/test/unit/fields_configuration_test.rb +18 -0
  54. data/test/unit/grid_panel_test.rb +29 -27
  55. metadata +41 -16
  56. data/lib/app/models/netzke_auto_column.rb +0 -4
  57. data/lib/app/models/netzke_auto_field.rb +0 -4
  58. data/lib/app/models/netzke_auto_table.rb +0 -61
  59. data/lib/netzke/active_record/basepack.rb +0 -134
  60. data/lib/netzke/grid_panel/javascripts/filters.js +0 -7
  61. data/test/app_root/db/migrate/20090102223630_create_netzke_layouts.rb +0 -14
  62. data/test/unit/helper_model_test.rb +0 -30
@@ -1,12 +1,26 @@
1
- require 'activerecord'
1
+ require 'active_record'
2
2
  require 'searchlogic'
3
3
  require 'will_paginate'
4
4
 
5
5
  module Netzke
6
6
  class GridPanel < Base
7
7
  module GridPanelApi
8
+
9
+ #
10
+ # Grid's native API
11
+ #
12
+
13
+ def get_data(params = {})
14
+ if !ext_config[:prohibit_read]
15
+ records = get_records(params)
16
+ {:data => records.map{|r| r.to_array(columns, self)}, :total => ext_config[:enable_pagination] && records.total_entries}
17
+ else
18
+ flash :error => "You don't have permissions to read data"
19
+ {:feedback => @flash}
20
+ end
21
+ end
22
+
8
23
  def post_data(params)
9
- success = true
10
24
  mod_records = {}
11
25
  [:create, :update].each do |operation|
12
26
  data = ActiveSupport::JSON.decode(params["#{operation}d_records"]) if params["#{operation}d_records"]
@@ -14,8 +28,10 @@ module Netzke
14
28
  mod_records[operation] = process_data(data, operation)
15
29
  mod_records[operation] = nil if mod_records[operation].empty?
16
30
  end
17
- break if !success
18
31
  end
32
+
33
+ on_data_changed
34
+
19
35
  {
20
36
  :update_new_records => mod_records[:create],
21
37
  :update_mod_records => mod_records[:update] || {},
@@ -23,48 +39,20 @@ module Netzke
23
39
  }
24
40
  end
25
41
 
26
- def get_data(params = {})
27
- if !ext_config[:prohibit_read]
28
- records = get_records(params)
29
- {:data => records.map{|r| r.to_array(normalized_columns, self)}, :total => ext_config[:enable_pagination] && records.total_entries}
30
- else
31
- flash :error => "You don't have permissions to read data"
32
- {:feedback => @flash}
33
- end
34
- end
35
-
36
42
  def delete_data(params)
37
43
  if !ext_config[:prohibit_delete]
38
44
  record_ids = ActiveSupport::JSON.decode(params[:records])
39
45
  data_class.destroy(record_ids)
46
+ on_data_changed
40
47
  {:feedback => "Deleted #{record_ids.size} record(s)", :load_store_data => get_data}
41
48
  else
42
49
  {:feedback => "You don't have permissions to delete data"}
43
50
  end
44
51
  end
45
52
 
46
- # Given an index of a column among enabled (non-excluded) columns, provides the index (position) in the table
47
- def normalize_index(index)
48
- norm_index = 0
49
- index.times do
50
- while true do
51
- norm_index += 1
52
- break unless normalized_columns[norm_index][:excluded]
53
- end
54
- end
55
- norm_index
56
- end
57
-
58
53
  def resize_column(params)
59
54
  raise "Called api_resize_column while not configured to do so" if ext_config[:enable_column_resize] == false
60
- column_at(normalize_index(params[:index].to_i))[:width] = params[:size].to_i
61
- save_columns!
62
- {}
63
- end
64
-
65
- def hide_column(params)
66
- raise "Called api_hide_column while not configured to do so" if ext_config[:enable_column_hide] == false
67
- column_at(normalize_index(params[:index].to_i))[:hidden] = params[:hidden].to_b
55
+ columns[normalize_index(params[:index].to_i)][:width] = params[:size].to_i
68
56
  save_columns!
69
57
  {}
70
58
  end
@@ -83,276 +71,285 @@ module Netzke
83
71
  {}
84
72
  end
85
73
 
86
- # Return the choices for the column
74
+ def hide_column(params)
75
+ raise "Called api_hide_column while not configured to do so" if ext_config[:enable_column_hide] == false
76
+ columns[normalize_index(params[:index].to_i)][:hidden] = params[:hidden].to_b
77
+ save_columns!
78
+ {}
79
+ end
80
+
81
+ # Returns choices for a column
87
82
  def get_combobox_options(params)
88
83
  column = params[:column]
89
84
  query = params[:query]
90
85
  {:data => data_class.options_for(column, query).map{|s| [s]}}
86
+ # {:data => data_class.options_for(column, query).map{|s| [s]}}
91
87
  end
92
88
 
93
- # Returns searchlogic's search with all the conditions
94
- def get_search(params)
95
- @search ||= begin
96
- # make params coming from Ext grid filters understandable by searchlogic
97
- search_params = normalize_params(params)
89
+ def move_rows(params)
90
+ if defined?(ActsAsList) && data_class.ancestors.include?(ActsAsList::InstanceMethods)
91
+ ids = JSON.parse(params[:ids]).reverse
92
+ ids.each_with_index do |id, i|
93
+ r = data_class.find(id)
94
+ r.insert_at(params[:new_index].to_i + i + 1)
95
+ end
96
+ on_data_changed
97
+ else
98
+ raise RuntimeError, "Data class should 'acts_as_list' to support moving rows"
99
+ end
100
+ {}
101
+ end
102
+
103
+ #
104
+ # Some aggregatees' overridden API
105
+ #
106
+
107
+ ## Edit in form specific API
108
+ def add_form__item__netzke_submit(params)
109
+ res = aggregatee_instance(:add_form__item).netzke_submit(params)
110
+
111
+ if res[:set_form_values]
112
+ # successful creation
113
+ on_data_changed
114
+ res[:set_form_values] = nil
115
+ end
116
+ res.to_nifty_json
117
+ end
98
118
 
99
- # merge with conditions coming from the config
100
- search_params[:conditions].deep_merge!(config[:conditions] || {})
119
+ def edit_form__item__netzke_submit(params)
120
+ res = aggregatee_instance(:edit_form__item).netzke_submit(params)
101
121
 
102
- # merge with extra conditions (in searchlogic format, come from the extended search form)
103
- search_params[:conditions].deep_merge!(
104
- normalize_extra_conditions(ActiveSupport::JSON.decode(params[:extra_conditions]))
105
- ) if params[:extra_conditions]
122
+ if res[:set_form_values]
123
+ on_data_changed
124
+ res[:set_form_values] = nil
125
+ end
126
+
127
+ res.to_nifty_json
128
+ end
106
129
 
107
- search = data_class.search(search_params)
130
+ def multi_edit_form__item__netzke_submit(params)
131
+ ids = ActiveSupport::JSON.decode(params.delete(:ids))
132
+ data = ids.collect{ |id| ActiveSupport::JSON.decode(params[:data]).merge("id" => id) }
133
+
134
+ mod_records_count = process_data(data, :update).count
135
+
136
+ # remove duplicated flash messages
137
+ @flash = @flash.inject([]){ |r,hsh| r.include?(hsh) ? r : r.push(hsh) }
138
+
139
+ if mod_records_count > 0
140
+ on_data_changed
141
+ flash :notice => "Updated #{mod_records_count} records."
142
+ {:set_result => "ok", :feedback => @flash}.to_nifty_json
143
+ else
144
+ {:feedback => @flash}.to_nifty_json
145
+ end
146
+ end
108
147
 
109
- # applying scopes
110
- scopes.each do |s|
111
- if s.is_a?(Array)
112
- scope_name, *args = s
113
- search.send(scope_name, *args)
114
- else
115
- search.send(s, true)
148
+ protected
149
+ # Override this method to react on each operation that caused changing of data
150
+ def on_data_changed; end
151
+
152
+ # Given an index of a column among enabled (non-excluded) columns, provides the index (position) in the table
153
+ def normalize_index(index)
154
+ norm_index = 0
155
+ index.times do
156
+ while true do
157
+ norm_index += 1
158
+ break unless columns[norm_index][:included] == false
116
159
  end
117
160
  end
118
-
119
- search
161
+ norm_index
120
162
  end
121
- end
122
163
 
123
- def configuration_panel__columns__get_combobox_options(params)
124
- query = params[:query]
164
+ # Returns searchlogic's search with all the conditions
165
+ def get_search(params)
166
+ @search ||= begin
167
+ # make params coming from Ext grid filters understandable by searchlogic
168
+ search_params = normalize_params(params)
169
+
170
+ # merge with conditions coming from the config
171
+ search_params[:conditions].deep_merge!(config[:conditions] || {})
172
+
173
+ # merge with extra conditions (in searchlogic format, come from the extended search form)
174
+ search_params[:conditions].deep_merge!(
175
+ normalize_extra_conditions(ActiveSupport::JSON.decode(params[:extra_conditions]))
176
+ ) if params[:extra_conditions]
177
+
178
+ search = data_class.search(search_params)
125
179
 
126
- data_arry = case params[:column]
127
- when "name"
128
- predefined_columns.map{ |c| c[:name].to_s }
129
- else
130
- raise RuntimeError, "Don't know about options for column '#{params[:column]}'"
131
- end
180
+ # applying scopes
181
+ scopes.each do |s|
182
+ if s.is_a?(Array)
183
+ scope_name, *args = s
184
+ search.send(scope_name, *args)
185
+ else
186
+ search.send(s, true)
187
+ end
188
+ end
132
189
 
133
- {:data => data_arry.grep(/^#{query}/).map{ |n| [n] }}.to_nifty_json
134
- end
135
-
136
- protected
190
+ search
191
+ end
192
+ end
137
193
 
138
- # operation => :update || :create
139
- def process_data(data, operation)
140
- success = true
141
- # mod_record_ids = []
142
- mod_records = {}
143
- if !ext_config["prohibit_#{operation}".to_sym]
144
- modified_records = 0
145
- data.each do |record_hash|
146
- id = record_hash.delete('id')
147
- record = operation == :create ? data_class.new : data_class.find(id)
148
- success = true
194
+ # Params:
195
+ # <tt>:operation</tt>: :update or :create
196
+ def process_data(data, operation)
197
+ success = true
198
+ # mod_record_ids = []
199
+ mod_records = {}
200
+ if !ext_config[:"prohibit_#{operation}"]
201
+ modified_records = 0
202
+ data.each do |record_hash|
203
+ id = record_hash.delete('id')
204
+ record = operation == :create ? data_class.new : data_class.find(id)
205
+ success = true
149
206
 
150
- # merge with strong default attirbutes
151
- record_hash.merge!(config[:strong_default_attrs]) if config[:strong_default_attrs]
207
+ # merge with strong default attirbutes
208
+ record_hash.merge!(config[:strong_default_attrs]) if config[:strong_default_attrs]
152
209
 
153
- # process all attirubutes for this record
154
- record_hash.each_pair do |k,v|
155
- begin
156
- record.send("#{k}=",v)
157
- rescue ArgumentError => exc
158
- flash :error => exc.message
159
- success = false
160
- break
210
+ # process all attirubutes for this record
211
+ record_hash.each_pair do |k,v|
212
+ begin
213
+ record.send("#{k}=",v)
214
+ rescue ArgumentError => exc
215
+ flash :error => exc.message
216
+ success = false
217
+ break
218
+ end
161
219
  end
162
- end
163
220
 
164
- # try to save
165
- # modified_records += 1 if success && record.save
166
- mod_records[id] = record.to_array(columns, self) if success && record.save
167
- # mod_record_ids << id if success && record.save
221
+ # try to save
222
+ # modified_records += 1 if success && record.save
223
+ mod_records[id] = record.to_array(columns, self) if success && record.save
224
+ # mod_record_ids << id if success && record.save
168
225
 
169
- # flash eventual errors
170
- if !record.errors.empty?
171
- success = false
172
- record.errors.each_full do |msg|
173
- flash :error => msg
226
+ # flash eventual errors
227
+ if !record.errors.empty?
228
+ success = false
229
+ record.errors.each_full do |msg|
230
+ flash :error => msg
231
+ end
174
232
  end
175
233
  end
234
+ # flash :notice => "#{operation.to_s.capitalize}d #{modified_records} record(s)"
235
+ else
236
+ success = false
237
+ flash :error => "You don't have permissions to #{operation} data"
176
238
  end
177
- # flash :notice => "#{operation.to_s.capitalize}d #{modified_records} record(s)"
178
- else
179
- success = false
180
- flash :error => "You don't have permissions to #{operation} data"
239
+ mod_records
181
240
  end
182
- mod_records
183
- end
184
241
 
185
- # get records
186
- def get_records(params)
187
- # Restore params from widget_session if requested
188
- if params[:with_last_params]
189
- params = widget_session[:last_params]
190
- else
191
- # remember the last params
192
- widget_session[:last_params] = params
193
- end
242
+ # get records
243
+ def get_records(params)
244
+ # Restore params from widget_session if requested
245
+ if params[:with_last_params]
246
+ params = widget_session[:last_params]
247
+ else
248
+ # remember the last params
249
+ widget_session[:last_params] = params
250
+ end
194
251
 
195
- search = get_search(params)
252
+ search = get_search(params)
196
253
 
197
- # sorting
198
- if params[:sort]
199
- assoc, method = params[:sort].split('__')
200
- sort_string = method.nil? ? assoc : "#{assoc}_#{method}"
201
- sort_string = (params[:dir] == "ASC" ? "ascend_by_" : "descend_by_") + sort_string
202
- search.order(sort_string)
203
- end
254
+ # sorting
255
+ if params[:sort]
256
+ assoc, method = params[:sort].split('__')
257
+ sort_string = method.nil? ? assoc : "#{assoc}_#{method}"
258
+ sort_string = (params[:dir] == "ASC" ? "ascend_by_" : "descend_by_") + sort_string
259
+ search.order(sort_string)
260
+ end
204
261
 
205
- # pagination
206
- if ext_config[:enable_pagination]
207
- per_page = ext_config[:rows_per_page]
208
- page = params[:limit] ? params[:start].to_i/params[:limit].to_i + 1 : 1
209
- search.paginate(:per_page => per_page, :page => page)
210
- else
211
- search.all
262
+ # pagination
263
+ if ext_config[:enable_pagination]
264
+ per_page = ext_config[:rows_per_page]
265
+ page = params[:limit] ? params[:start].to_i/params[:limit].to_i + 1 : 1
266
+ search.paginate(:per_page => per_page, :page => page)
267
+ else
268
+ search.all
269
+ end
212
270
  end
213
- end
214
271
 
215
- # Create record with form
216
- def create_new_record(params)
217
- form_data = ActiveSupport::JSON.decode(params[:data])
218
- res = aggregatee_instance(:new_record_form).create_or_update_record(form_data)
272
+ # When providing the edit_form aggregatee, fill in the form with the requested record
273
+ def load_aggregatee_with_cache(params)
274
+ if params[:id] == 'editForm'
275
+ aggregatees[:edit_form][:item].merge!(:record_id => params[:record_id])
276
+ end
219
277
 
220
- if res[:set_form_values]
221
- # successful creation
222
- res[:set_form_values] = nil
223
- res[:on_successfull_record_creation] = true
278
+ super
224
279
  end
225
- res
226
- end
227
280
 
228
- # Move rows
229
- def move_rows(params)
230
- if defined?(ActsAsList) && data_class.ancestors.include?(ActsAsList::InstanceMethods)
231
- ids = JSON.parse(params[:ids]).reverse
232
- ids.each_with_index do |id, i|
233
- r = data_class.find(id)
234
- r.insert_at(params[:new_index].to_i + i + 1)
235
- end
236
- else
237
- raise RuntimeError, "Data class should 'acts_as_list' to support moving rows"
281
+ # Search scopes, in searchlogic format
282
+ def scopes
283
+ @scopes ||= config[:scopes] || []
238
284
  end
239
- {}
240
- end
241
285
 
242
- # When providing the edit_form aggregatee, fill in the form with the requested record
243
- def load_aggregatee_with_cache(params)
244
- if params[:id] == 'editForm'
245
- aggregatees[:edit_form].merge!(:record_id => params[:record_id])
246
- end
247
-
248
- super
249
- end
250
-
251
- # Search scopes, in searchlogic format
252
- def scopes
253
- @scopes ||= config[:scopes] || []
254
- end
286
+ # Converts Ext.ux.grid.GridFilters filters to searchlogic conditions, e.g.
287
+ # {"0" => {
288
+ # "data" => {
289
+ # "type" => "numeric",
290
+ # "comparison" => "gt",
291
+ # "value" => 10 },
292
+ # "field" => "id"
293
+ # },
294
+ # "1" => {
295
+ # "data" => {
296
+ # "type" => "string",
297
+ # "value" => "pizza"
298
+ # },
299
+ # "field" => "food_name"
300
+ # }}
301
+ #
302
+ # =>
303
+ #
304
+ # {"id_gt" => 100, "food_name_contains" => "pizza"}
305
+ def convert_filters(column_filter)
306
+ res = {}
307
+ column_filter.each_pair do |k,v|
308
+ field = v["field"].dup
255
309
 
256
- # Converts Ext.grid.GridFilters filters to searchlogic conditions, e.g.
257
- # {"0" => {
258
- # "data" => {
259
- # "type" => "numeric",
260
- # "comparison" => "gt",
261
- # "value" => 10 },
262
- # "field" => "id"
263
- # },
264
- # "1" => {
265
- # "data" => {
266
- # "type" => "string",
267
- # "value" => "pizza"
268
- # },
269
- # "field" => "food_name"
270
- # }}
271
- #
272
- # =>
273
- #
274
- # {"id_gt" => 100, "food_name_contains" => "pizza"}
275
- def convert_filters(column_filter)
276
- res = {}
277
- column_filter.each_pair do |k,v|
278
- field = v["field"].dup
279
- case v["data"]["type"]
280
- when "string"
281
- field << "_contains"
282
- when "numeric"
283
- field << "_#{v["data"]["comparison"]}"
310
+ case v["data"]["type"]
311
+ when "string"
312
+ field << "_contains"
313
+ when "numeric", "date"
314
+ field << "_#{v["data"]["comparison"]}"
315
+ end
316
+
317
+ value = v["data"]["value"]
318
+ res.merge!({field => value})
284
319
  end
285
- value = v["data"]["value"]
286
- res.merge!({field => value})
320
+ res
287
321
  end
288
- res
289
- end
290
322
 
291
- def normalize_extra_conditions(conditions)
292
- conditions.deep_convert_keys{|k| k.to_s.gsub("__", "_").to_sym}
293
- end
323
+ def normalize_extra_conditions(conditions)
324
+ conditions.deep_convert_keys{|k| k.to_s.gsub("__", "_").to_sym}
325
+ end
294
326
 
295
- # make params understandable to searchlogic
296
- def normalize_params(params)
297
- # filters
298
- conditions = params[:filter] && convert_filters(params[:filter])
327
+ # make params understandable to searchlogic
328
+ def normalize_params(params)
329
+ # filters
330
+ conditions = params[:filter] && convert_filters(params[:filter])
331
+
332
+ normalized_conditions = {}
333
+ conditions && conditions.each_pair do |k, v|
334
+ normalized_conditions.merge!(k.gsub("__", "_") => v)
335
+ end
299
336
 
300
- normalized_conditions = {}
301
- conditions && conditions.each_pair do |k, v|
302
- assoc, method = k.split('__')
303
- normalized_conditions.merge!(method.nil? ? {assoc => v} : {assoc => {method => v}})
337
+ {:conditions => normalized_conditions}
304
338
  end
305
-
306
- {:conditions => normalized_conditions}
307
- end
308
339
 
309
- ## Edit in form specific API
310
- def new_record_form__netzke_submit(params)
311
- res = aggregatee_instance(:new_record_form).netzke_submit(params)
312
-
313
- if res[:set_form_values]
314
- # successful creation
315
- res[:set_form_values] = nil
316
- res.merge!({
317
- :parent => {:on_successfull_record_creation => true}
318
- })
319
- end
320
- res.to_nifty_json
321
- end
340
+ # def check_for_positive_result(res)
341
+ # if res[:set_form_values]
342
+ # # successful creation
343
+ # res[:set_form_values] = nil
344
+ # res.merge!({
345
+ # :parent => {:on_successfull_edit => true}
346
+ # })
347
+ # true
348
+ # else
349
+ # false
350
+ # end
351
+ # end
322
352
 
323
- def check_for_positive_result(res)
324
- if res[:set_form_values]
325
- # successful creation
326
- res[:set_form_values] = nil
327
- res.merge!({
328
- :parent => {:on_successfull_edit => true}
329
- })
330
- end
331
- end
332
-
333
- def edit_form__netzke_submit(params)
334
- res = aggregatee_instance(:edit_form).netzke_submit(params)
335
-
336
- check_for_positive_result(res)
337
-
338
- res.to_nifty_json
339
- end
340
-
341
- def multi_edit_form__netzke_submit(params)
342
- ids = ActiveSupport::JSON.decode(params.delete(:ids))
343
-
344
- res = {}
345
- ids.each do |id|
346
- form_instance = aggregatee_instance(:edit_form, :record => data_class.find(id))
347
- res = form_instance.netzke_submit(params)
348
- break if !res[:set_form_values]
349
- end
350
-
351
- check_for_positive_result(res)
352
-
353
- res.to_nifty_json
354
- end
355
-
356
353
  end
357
354
  end
358
355
  end