[Seaside] Nested Multi-Select-List.
Dario Trussardi
dtrussardi at tiscali.it
Sat Sep 23 15:38:22 UTC 2006
Hello All,
i work with VW 7.4.1 and SeasideScriptaculous (2.6b1.108.0,mbany) from store.cincomsmalltalk.com:5432_store_public.
My objective is create two Multi-Select-List, where,
when i change the Master Multi-Select-List selection i set the selections of the Slave Multi-Select-List ( with the Master Multi-Select-List selection )
For test my solution i change the Scriptaculous-Testing-> SUAllTest ->SUFormTest.
The relative method renderMultiSelectListOn: html
now is::
renderMultiSelectListOn: html
| fid mid idScnCnt mid2 |
fid := html nextId.
mid := html nextId.
idScnCnt := html nextId.
mid2 := html nextId.
(html div)
class: 'label';
with: 'Nested Multi-Select-List'.
(html div)
class: 'control';
with:
[(html form)
id: fid;
with:
[ "Master Multi-Select-List"
html select
size: 9;
beMultiple;
list: (1 to: 22);
selected: mutliSelectList;
callback: [:value | mutliSelectList := value];
onChange: ((html updater)
id: mid;
triggerForm: fid;
callback: [:r | r render: mutliSelectList]);
onChange:( html updater
id: idScnCnt;
triggerForm: fid;
callback: [ :r | "in this point create Slave Multi-Select-List in second case when Master change"
r render: scnCnt. ]).
(html div)
class: 'model';
id: mid;
with: mutliSelectList.
" create Slave Multi-Select-List before Master Multi-Select-List change "
scnCnt:= html select id: idScnCnt;
size: 9;
beMultiple;
list: mutliSelectList;
selected: mutliSelectList2;
callback: [ :value | mutliSelectList2 := value ];
onChange: (html updater
id: mid2;
triggerForm: fid;
callback: [ :r | r render: mutliSelectList2 ]).
html div class: 'model'; id: mid2; with: mutliSelectList2.
].
].
My problem is , when change the Master Multi-Select-List the Slave Multi-Select-List is not update.
I have note after change the Master Multi-Select-List and i select the Toggle Halos link the " Slave Multi-Select-List" is correct update.
Where i mistake ?
Any pointers would be greatly appreciated!
Thanks!
Dario Trussardi Romano.
I have do another solution where the Slave Multi-Select-List is create then the Master Multi-Select-List selection change.
In this case all functions but when i select the Toggle Halos link the Slave Multi-Select-List is lose.
Is this correct operation ?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/seaside/attachments/20060923/555a5899/attachment.htm
More information about the Seaside
mailing list