Updating two divs from the same updater?

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

Updating two divs from the same updater?

Alejandro Martínez
Hi. I'm using Scriptaculous and Seaside 2.7. Consider this case please.

I have :

select list SOURCE

select list A inside div A
select list B inside div B

I need to update both A and B with different data when I click an item of SOURCE select list.

AFAIK in SOURCE list i can specify one div A or B but not both. The following doesn't work for what I need:

html select
     ...
     onChange: ( html updater
                        id: 'A';
                        triggerFormElement: 'formId';
                        callback: [: r | self updateAOn: r.
                                             self updateBOn: r. ]
                      )

How can I update A and B using the same updater? Does anybody know the solution?
Cheers



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

Re: Updating two divs from the same updater?

Peter Osburg-2
Hi,

u need another div around both div's

let's say you have a div id="A_and_B"
so use another rendering method that renders both divs let's say we call it
renderABOn: html

so use the updater

html updater
                        id: 'A_and_B';
                        triggerFormElement: 'formId';
                        callback: [: r | self renderABOn: r. ]

that should help, i think :)

Alejandro Martínez schrieb:

> Hi. I'm using Scriptaculous and Seaside 2.7. Consider this case please.
>
> I have :
>
> select list SOURCE
>
> select list A inside div A
> select list B inside div B
>
> I need to update both A and B with different data when I click an item
> of SOURCE select list.
>
> AFAIK in SOURCE list i can specify one div A or B but not both. The
> following doesn't work for what I need:
>
> html select
>      ...
>      onChange: ( html updater
>                         id: 'A';
>                         triggerFormElement: 'formId';
>                         callback: [: r | self updateAOn: r.
>                                              self updateBOn: r. ]
>                       )
>
> How can I update A and B using the same updater? Does anybody know the
> solution?
> Cheers
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> 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
Reply | Threaded
Open this post in threaded view
|

Re: Updating two divs from the same updater?

Lukas Renggli
In reply to this post by Alejandro Martínez
> How can I update A and B using the same updater? Does anybody know the
> solution?

Search in the mailing list archive for #evaluator. This does exactly
what you need.

Lukas

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

RE: Updating two divs from the same updater?

Sebastian Sastre-2
In reply to this post by Alejandro Martínez
I think I would make the updater to render the component that owns that two components
 

Sebastian Sastre

 


De: [hidden email] [mailto:[hidden email]] En nombre de Alejandro Martínez
Enviado el: Miércoles, 10 de Octubre de 2007 05:34
Para: [hidden email]
Asunto: [Seaside] Updating two divs from the same updater?

Hi. I'm using Scriptaculous and Seaside 2.7. Consider this case please.

I have :

select list SOURCE

select list A inside div A
select list B inside div B

I need to update both A and B with different data when I click an item of SOURCE select list.

AFAIK in SOURCE list i can specify one div A or B but not both. The following doesn't work for what I need:

html select
     ...
     onChange: ( html updater
                        id: 'A';
                        triggerFormElement: 'formId';
                        callback: [: r | self updateAOn: r.
                                             self updateBOn: r. ]
                      )

How can I update A and B using the same updater? Does anybody know the solution?
Cheers



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

Re: Updating two divs from the same updater?

Alejandro Martínez
In reply to this post by Lukas Renggli
Thanks Lukas, it worked fine with the evaluator.

2007/10/10, Lukas Renggli <[hidden email]>:
> How can I update A and B using the same updater? Does anybody know the
> solution?

Search in the mailing list archive for #evaluator. This does exactly
what you need.

Lukas

--
Lukas Renggli
http://www.lukas-renggli.ch
_______________________________________________
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