[Seaside] Nested Multi-Select-List.

Dario Trussardi dtrussardi at tiscali.it
Mon Sep 25 15:27:17 UTC 2006

<That's not the way Seaside works. You cannot instantiate tags and
<reuse them multiple times in different rendering contexts.
<So to make your example works you need to split you code into multiple
<rendering methods. This is good practice anyway, it is painful trying
<to understand the code when written in one huge method like this. So
<instead of
<    scnCnt:=  html select id: idScnCnt;
<          ....
<you create a method that renders this part and call it from your
<callback blocks.

Thank Lukas.

The new metod now is:

  frsCnt:=  html select id: ( idFrstCnt:= html nextId);
                size: 4;
      list: (1 to: 100);
                selected: mutliSelectList;
       callback: [ :value | mutliSelectList := value ];  
                     onChange:( html updater
                     id:  idScnCnt; 
                     triggerForm: fid;
                     callback: [ :r |   self creaScnCnt: html.  ]).
     rfrScnCnt:=  html span class: 'dario' ;  id: idScnCnt; with:'PLUTO'.  

and the creaScnCnt is

creaScnCnt: html

 | mid1 |
mid1:= html nextId.
 scnCnt := html select id: ( html nextId) ;
                size: 4;
                list: self listaScn;
                 selected: scnMultiSelectList; 
                callback: [ :value | scnMultiSelectList := value ];
                onChange: (html updater
                     id: idTrzCnt ;
                     triggerForm: fid;
                     callback: [ :r | self creaTrzCnt: html. )].
   rfrTrzCnt:=  html span class: 'dario' ;  id: idTrzCnt; with:'Archimede'.

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/20060925/81c85c79/attachment.htm

More information about the Seaside mailing list