[Seaside] onClick notifications for check box or multiSelect

jsavidge at texas.net jsavidge at texas.net
Wed May 11 01:23:57 UTC 2011


Greetings Lukas,

On 5/10/11 11:47 AM, Lukas Renggli wrote:
> #with: has to be last in the cascade. Always. Slime can detect this problem.
>
> Also there seems to be something wrong with the callbacks. You have
> two independent AJAX requests. I don't think you need the #onClick:
> one.

I moved the >>with: to the end of the cascade, and I removed the >>onClick:,
but that didn’t seem to make a difference. The Transcript printing in my
callback: was never executed.

> There is a functional form test/example that demonstrates all the
> form elements.

I had been looking at examples before I got to this point, but I must not be
looking at the correct ones. Are you referring to any of the following, or are
there other examples that you would suggest?

JQFormFunctionalTest>>renderCheckBoxOn:
JQFormFunctionalTest>>renderMultiSelectListOn:

JQButtonFunctionalTest>>renderCheckBoxOn:

Scriptaculous.SUFormTest>>renderCheckBoxOn:
Scriptaculous.SUFormTest>>renderMultiSelectListOn

James T. Savidge, [jsavidge at texas.net], Tuesday, May 10, 2011
-- 

“Don’t worry Bob. Here’s what to do. ... Raise the Exception, walkback, and
nobody gets hurt.”

> HTH,
> Lukas
>
>
>
>
> On Tuesday, 10 May 2011,  <jsavidge at texas.net> wrote:
>> Greetings,
>>
>> Despite trying to follow the suggestions I have seen in the discussions and in
>> the documentation, I can’t seem to get onClick notifications to work on
>> checkbox(s) or multiSelect.
>>
>> My goal is to present the user with a list of selections, and when they click
>> on one of the items in the list, I want to refresh a secondary list with data
>> that is related to selection they made in the first list.
>>
>> Attached is a file out for my attempt to get onClick to work on a checkbox by
>> modifying the WACounter example.
>>
>> My testing have been in VisualWorks 7.7.1 + Seaside 3.0 - 7, and also in
>> WebVelocity 1.1. I’ve tried this in Firefox 3.x, 4.x, and Internet Explorer 8.
>>
>> Here is the method that is included in the attached file-out:
>>
>> ----------------------------------------------------------
>> WACounter>>renderContentOn: html
>>     html form: [
>>         html heading: count.
>>         html anchor
>>             callback: [ self increase ];
>>             with: '++'.
>>         html space.
>>         html anchor
>>             callback: [ self decrease ];
>>             with: '--'.
>>         html checkbox
>>             with: 'Checkbox test';
>>             onChange: ( html jQuery ajax serializeThisWithHidden );
>>             onClick: ( html jQuery ajax callback: [ :selection | Transcript
>> show: 'checkbox onClick hit.'. ] );
>>             callback: [ :selection | Transcript show: 'checkbox callback
hit.'. ].
>>     ].
>> ----------------------------------------------------------
>>
>> Am I missing something?
>>
>> James T. Savidge, [jsavidge at texas.net], Monday, May 9, 2011
>> --
>>
>> “Don’t worry Bob. Here’s what to do. ... Raise the Exception, walkback, and
>> nobody gets hurt.”
>>
>> _______________________________________________
>> seaside mailing list
>> seaside at lists.squeakfoundation.org
>> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside



More information about the seaside mailing list