Class: Glib::JsonUi::ViewBuilder::Panels::BulkEdit3

Inherits:
View show all
Defined in:
app/helpers/glib/json_ui/view_builder/panels.rb

Overview

The generic bulk-edit table: form-peer submission, per-row POSTs, viewCells/viewHeaders, plus the full parse/gate/dedup config so any consumer can compose specialized import behavior (it replaced the retired bulkEdit2 and bulkEditSg -- see the component's header comment for the full mapping).

Instance Attribute Summary

Attributes inherited from JsonUiElement

#json, #page

Instance Method Summary collapse

Methods inherited from View

component_name

Methods inherited from JsonUiElement

action, any, array, badgeable, bool, color, component_name, date, date_time, enum, float, hash, icon, #initialize, int, length, menu, panels_builder, #props, required, singleton_array, string, text, url, views

Constructor Details

This class inherits a constructor from Glib::JsonUi::JsonUiElement

Instance Method Details

#created ⇒ Object

Override



505
506
507
508
509
510
511
512
513
514
515
516
# File 'app/helpers/glib/json_ui/view_builder/panels.rb', line 505

def created
  # bulkEdit3 is a form PEER, not a form child: it answers the same
  # forms_submit action a form does (forms/directSubmit) and submits its
  # rows itself to `import.submitUrl`. Inside a form, its repeated
  # per-row input names would collide with the form's FormData scans
  # (duplicate-name warnings, dirty-baseline pollution) while adding
  # nothing to the form's submission -- so, like a nested form, reject
  # the arrangement at render time.
  if page.current_form
    raise 'panels_bulkEdit3 is not allowed inside a form; place it as a sibling and target it with forms_submit targetId'
  end
end

#dataRows(value) ⇒ Object



603
604
605
# File 'app/helpers/glib/json_ui/view_builder/panels.rb', line 603

def dataRows(value)
  json.dataRows value
end

#viewCells(values) ⇒ Object



595
596
597
598
599
600
601
# File 'app/helpers/glib/json_ui/view_builder/panels.rb', line 595

def viewCells(values)
  json.set! 'viewCells' do
    values.each do |value|
      value.call(page.view_builder)
    end
  end
end

#viewRows(value) ⇒ Object



607
608
609
# File 'app/helpers/glib/json_ui/view_builder/panels.rb', line 607

def viewRows(value)
  json.viewRows value
end