[Seaside] [BUG][FIX] missing #fixTemps in
#textInputWithValue:callbackBlock:
Michal
miso.list at auf.net
Thu Mar 18 00:20:39 CET 2004
Hi - If you put several textInputs within a callback such as:
collec do: [:item | ... textInputWithCallback: [:v | ... item ... ]
only the last one will work correctly (snippet showing this appended
below). The exact same code with #selectFromList instead of textInput
works correctly. The bug is fixed by adding a call to #fixTemps in
#textInputWithValue:callback: as in:
textInputWithValue: anObject callback: callbackBlock
callbackBlock fixTemps.
self
valueInputOfType: 'text'
value: anObject
callback: callbackBlock
Michal
ps. code snippet showing the bug. Presupposes you have a global Temp holding a Dictionary. Put this as the body of your renderContentOn: method and try changing the values in the rendered form.
| all |
all := Temp at: #debug ifAbsent: [
Temp at: #debug put: OrderedCollection new.
1 to: 5 do: [:i | (Temp at: #debug) addLast: {i . i. nil}].
Temp at: #debug].
html heading: 'show the bug'.
html form: [
html table: [
all do: [:item |
html tableRow: [
html tableData: [
html textInputWithValue: (item at: 2) callback: [:v | item at: 2 put: v]].
html tableData: [
html selectFromList: {'a'.'b'.'c'} selected: (item at: 3) callback: [:v | item at: 3 put: v]]]]].
html submitButton].
More information about the Seaside
mailing list