List Callback Not Called From Updater

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

List Callback Not Called From Updater

Quenio dos Santos
Hello,

I am struggling with this one for a while, and I can't figure out what's wrong. The callbacks in the component listed below never get called, which makes the div not get updated. I have based this on an example I found at http://scriptaculous.seasidehosting.st

Would anyone please point out what I am missing here?

'From Squeak3.9.1 of 2 March 2008 [latest update: #7075] on 20 June 2008 at 4:59:28 am'!
WAComponent subclass: #TMBrowser
instanceVariableNames: 'selection'
classVariableNames: ''
poolDictionaries: ''
category: 'Testmator-View'!

!TMBrowser methodsFor: 'rendering' stamp: 'QCMS 6/20/2008 04:56'!
renderContentOn: html
| fid sid |
html heading: 'Browser'.
html form 
id: (fid := html nextId);
with: [
html select
list: #('1' '2');
selected: selection;
callback: [ :value | selection := value ];
onChange: (
html updater
                 id: (sid := html nextId);
               triggerForm: fid;
callback: [ :r | r render: selection ])
].
html div
  id: sid;
   with: selection.
! !


!TMBrowser methodsFor: 'accessing' stamp: 'QCMS 6/19/2008 00:42'!
selection
^selection! !

!TMBrowser methodsFor: 'accessing' stamp: 'QCMS 6/19/2008 00:43'!
selection: newSelection
selection := newSelection! !


!TMBrowser methodsFor: 'initialization' stamp: 'QCMS 6/20/2008 03:43'!
initialize
super initialize.
selection := '2'! !
 

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

Re: List Callback Not Called From Updater

Lukas Renggli
> Would anyone please point out what I am missing here?

What does FireBug say?

Cheers,
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: List Callback Not Called From Updater

Quenio dos Santos
I am sorry. I don't know what FireBug is :)

On Fri, Jun 20, 2008 at 6:21 AM, Lukas Renggli <[hidden email]> wrote:
> Would anyone please point out what I am missing here?

What does FireBug say?

Cheers,
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
Reply | Threaded
Open this post in threaded view
|

Re: List Callback Not Called From Updater

Lukas Renggli
> I am sorry. I don't know what FireBug is :)

The FireFox plugin that probably answers your question.

Lukas

>
>
> On Fri, Jun 20, 2008 at 6:21 AM, Lukas Renggli <[hidden email]> wrote:
> >
> >
> > > Would anyone please point out what I am missing here?
> >
> > What does FireBug say?
> >
> > Cheers,
> > 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
>
>


--
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: List Callback Not Called From Updater

Quenio dos Santos
OK. I'll try to use FireBug. Thanks.

On Fri, Jun 20, 2008 at 6:28 AM, Lukas Renggli <[hidden email]> wrote:
> I am sorry. I don't know what FireBug is :)

The FireFox plugin that probably answers your question.

Lukas

>
>
> On Fri, Jun 20, 2008 at 6:21 AM, Lukas Renggli <[hidden email]> wrote:
> >
> >
> > > Would anyone please point out what I am missing here?
> >
> > What does FireBug say?
> >
> > Cheers,
> > 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
>
>


--
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
Reply | Threaded
Open this post in threaded view
|

Re: List Callback Not Called From Updater

Quenio dos Santos
Lukas,

Thanks a lot on the tip about FireBug. It is a really cool tool; very useful.

I was able to see what is causing my problem. I got a message in the console saying the "Axaj.Updater is not defined." It sounds like the page is not loading scriptaculous. Do I need to override any method in my root component in order for scriptaculous to get loaded in the page?

On Fri, Jun 20, 2008 at 6:29 AM, Quenio dos Santos <[hidden email]> wrote:
OK. I'll try to use FireBug. Thanks.


On Fri, Jun 20, 2008 at 6:28 AM, Lukas Renggli <[hidden email]> wrote:
> I am sorry. I don't know what FireBug is :)

The FireFox plugin that probably answers your question.

Lukas

>
>
> On Fri, Jun 20, 2008 at 6:21 AM, Lukas Renggli <[hidden email]> wrote:
> >
> >
> > > Would anyone please point out what I am missing here?
> >
> > What does FireBug say?
> >
> > Cheers,
> > 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
>
>


--
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
Reply | Threaded
Open this post in threaded view
|

Re: List Callback Not Called From Updater

cedreek
Hi,

> I was able to see what is causing my problem. I got a message in the console
> saying the "Axaj.Updater is not defined." It sounds like the page is not
> loading scriptaculous. Do I need to override any method in my root component
> in order for scriptaculous to get loaded in the page?

You need to associate the scriptaculous library  to your applciation.
Either programmaticlay or from the config interface.
Go in config then choose your app (configure) then add SULibrary form
the drop down.

To do that programmaticaly, in the class side of you main component,
do something like:

initialize
        (self registerAsApplication: 'yourAppName')
                libraries
                        add: SULibrary.

Cédrick

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

Re: List Callback Not Called From Updater

Quenio dos Santos
That worked great. Thanks a lot!

On Sat, Jun 21, 2008 at 9:57 AM, cdrick <[hidden email]> wrote:
Hi,

> I was able to see what is causing my problem. I got a message in the console
> saying the "Axaj.Updater is not defined." It sounds like the page is not
> loading scriptaculous. Do I need to override any method in my root component
> in order for scriptaculous to get loaded in the page?

You need to associate the scriptaculous library  to your applciation.
Either programmaticlay or from the config interface.
Go in config then choose your app (configure) then add SULibrary form
the drop down.

To do that programmaticaly, in the class side of you main component,
do something like:

initialize
       (self registerAsApplication: 'yourAppName')
               libraries
                       add: SULibrary.

Cédrick

_______________________________________________
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