html select with two onChange definition, d'ont work well

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

html select with two onChange definition, d'ont work well

dtrussardi@tiscali.it
Hi All,
 
i work with Squeak and seaside support.
 
I have one html select definition 
     and i need to update two area in a web page.
 
 
The code is:
 
html select
beOptional;
list: aCollection;
labels: labelBlock;
id: (id := html nextId);
optionalLabel: '(select all)';
selected: (selected := selectionPath
at: anInteger
ifAbsent: [ selectionPath addLast: nil. nil ]);
callback: [ :value |
[ selectionPath size < anInteger ]
whileFalse: [ selectionPath removeLast ].
selectionPath addLast: value ];
onChange: (html updater
id: uid;
triggerFormElement: id;
callback: [ :r | self renderListOn: r]);
   
onChange:(html updater
id: rfrMasterHtml idReportToUpd;
triggerFormElement: id;
callback: [ :r |    rfrMasterHtml updateView: r    ]).
 
 
I have strange behaviour on instance variable 'selectionPath ' when i use 2 onChange definition.
 
The system lose the selectionPath state.
 
My question is :
 
I can define multiple onChange definition to update some different area ?
 
    My definition is correct, or i wrong ?
 

Any pointers would be greatly appreciated!

Thanks!

Dario

 
 

_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: html select with two onChange definition, d'ont work well

Gerhard Obermann
Hi!

You should use html evaluator instead of html updater!
With html evaluator it is possible to update more html elements with one ajax call.

br
Gerhard

On Thu, Aug 7, 2008 at 6:28 PM, Dario Trussardi <[hidden email]> wrote:
Hi All,
 
i work with Squeak and seaside support.
 
I have one html select definition 
     and i need to update two area in a web page.
 
 
The code is:
 
html select
beOptional;
list: aCollection;
labels: labelBlock;
id: (id := html nextId);
optionalLabel: '(select all)';
selected: (selected := selectionPath
at: anInteger
ifAbsent: [ selectionPath addLast: nil. nil ]);
callback: [ :value |
[ selectionPath size < anInteger ]
whileFalse: [ selectionPath removeLast ].
selectionPath addLast: value ];
onChange: (html updater
id: uid;
triggerFormElement: id;
callback: [ :r | self renderListOn: r]);
   
onChange:(html updater
id: rfrMasterHtml idReportToUpd;
triggerFormElement: id;
callback: [ :r |    rfrMasterHtml updateView: r    ]).
 
 
I have strange behaviour on instance variable 'selectionPath ' when i use 2 onChange definition.
 
The system lose the selectionPath state.
 
My question is :
 
I can define multiple onChange definition to update some different area ?
 
    My definition is correct, or i wrong ?
 

Any pointers would be greatly appreciated!

Thanks!

Dario

 
 

_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside



_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside