81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
|
# File 'lib/ydim/html/view/htmlgrid.rb', line 81
def List.ajax_inputs(*keys)
keys.each { |key|
define_method(key) { |model|
name = "#{key}[#{model.index}]"
input = HtmlGrid::InputText.new(name, model, @session, self)
input.value = format(model.send(key))
input.css_id = name
args = [
:unique_id, @session.state.model.unique_id,
:index, model.index,
key, nil,
]
url = @lookandfeel.event_url(:ajax_item, args)
input.set_attribute('onChange', "reload_data('#{url}' + sbsm_encode(this.value))")
input
}
}
end
|