[Seaside] nested LiveCallbacks

Juan Burella juan.burella at gmail.com
Thu Oct 27 17:51:44 UTC 2005


 Using this version it works in a different way but not completely right.
When the second list is selected everything works fine, but then the first
one is selected, it disappears leaving only the second and the third
visible.

On 10/27/05, Michel Bany <m.bany at wanadoo.fr> wrote:
>
> Juan Burella a écrit :
>
> > Hello,
> >
> > I have a problem with 3 nested LiveCallbacks. For example, I have 3
> > selects (drop lists), and when the first one is selected, the
> > LiveCallback of the second stop working. My question is: am I working
> > correctly with LiveCallback or I am doing something wrong? What's the
> > errror?. I attach an example.
> >
> >
> >
> Can you try with Seaside2.5b8-mb.14 and let me know ?
> Thanks,
> Michel.
>
>
> > Thanks in advance and I look forward for your help.
> >
> > Best wishes,
> >
> > Juan M. Burella
> >
> >
> >
> > I am working with Seaside2.5/Squeak3.7.
> >
> > 'From Squeak3.7 of ''4 September 2004'' [latest update: #5989] on 27
> > October 2005 at 11:47:15 am'!
> > WAComponent subclass: #NestedLiveCallbackExample
> > instanceVariableNames: ''
> > classVariableNames: ''
> > poolDictionaries: ''
> > category: 'SeaComp-Example'!
> >
> > !NestedLiveCallbackExample methodsFor: 'callback' stamp: 'jmb
> > 10/27/2005 11:46'!
> > countrySelected: anObject on: aRenderer
> >
> > | provincesName citiesName |
> > (anObject = 'Aruba')
> > ifTrue: [
> > provincesName := #().
> > citiesName := #( 'Aruba')
> > ]
> > ifFalse: [
> > provincesName := #( 'Buenos Aires' 'Cordoba').
> > citiesName := #(' Ciudad Aut—noma de Buenos AiresCiudad' )
> > ].
> >
> > aRenderer spanNamed: 'provinceSelector' with: [
> > aRenderer
> > selectFromList: provincesName
> > selected: nil
> > callback:[:f | ]
> > labels: [:ea | ea ]
> > liveCallback: [:anObj :h | self provinceSelected: anObject on: h].
> >
> > aRenderer spanNamed: 'citySelector' with: [
> > aRenderer
> > selectFromList: citiesName
> > selected: nil
> > callback:[:f | ]
> > labels: [:ea | ea ].
> > ]
> > ].
> > ! !
> >
> > !NestedLiveCallbackExample methodsFor: 'callback' stamp: 'jmb
> > 10/27/2005 11:46'!
> > provinceSelected: anObject on: aRenderer
> >
> > | aNameCities |
> >
> > aNameCities := (anObject = 'Buenos Aires') ifTrue: [ #('La Plata'
> > 'Azul')] ifFalse: [ #('Alta Gracia' 'La Falda ')].
> >
> > aRenderer spanNamed: 'citySelector' with: [
> > aRenderer
> > selectFromList: aNameCities
> > selected: nil
> > callback:[:f | ]
> > labels: [:ea | ea ].
> > ]
> >
> >
> >
> >
> >
> > ! !
> >
> >
> > !NestedLiveCallbackExample methodsFor: 'rendering' stamp: 'jmb
> > 10/27/2005 11:43'!
> > renderContentOn: aRenderer
> >
> > aRenderer
> > selectFromList: #( 'Argentina' 'Aruba' )
> > selected: 'Argentina'
> > callback:[:f | ]
> > labels: [:ea | ea ]
> > liveCallback: [:anObject :h | self countrySelected: anObject on: h].
> >
> > self renderNestedSelectOn: aRenderer.! !
> >
> > !NestedLiveCallbackExample methodsFor: 'rendering' stamp: 'jmb
> > 10/27/2005 11:46'!
> > renderNestedSelectOn: aRenderer
> >
> > aRenderer spanNamed: 'provinceSelector' with: [
> > aRenderer
> > selectFromList: #( 'Buenos Aires' 'Cordoba')
> > selected: nil
> > callback:[:f | ]
> > labels: [:ea | ea ]
> > liveCallback: [:anObject :h | self provinceSelected: anObject on: h].
> >
> > aRenderer spanNamed: 'citySelector' with: [
> > aRenderer
> > selectFromList: #( 'Ciudad Aut—noma de Buenos AiresCiudad' )
> > selected: nil
> > callback:[:f | ]
> > labels: [:ea | ea ]
> > ]
> > ].! !
> >
> > "-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- "!
> >
> > NestedLiveCallbackExample class
> > instanceVariableNames: ''!
> >
> > !NestedLiveCallbackExample class methodsFor: 'as yet unclassified'
> > stamp: 'jmb 10/27/2005 11:34'!
> > canBeRoot
> >
> > ^true! !
> >
> >
> >------------------------------------------------------------------------
> >
> >_______________________________________________
> >Seaside mailing list
> >Seaside at lists.squeakfoundation.org
> >http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
> >
> >
>
> _______________________________________________
> Seaside mailing list
> Seaside at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://liststest.squeakfoundation.org/pipermail/seaside/attachments/20051027/528932a3/attachment.html


More information about the Seaside mailing list