[Seaside] General subclassing question with regards tocallbacks...

Boris Popov boris at deepcovelabs.com
Wed Nov 12 15:42:57 UTC 2008


Lukas,

I don't mean to nitpick, but you can have more than one body in a table,
one for each row group.

Cheers,

-Boris

-- 
+1.604.689.0322
DeepCove Labs Ltd.
4th floor 595 Howe Street
Vancouver, Canada V6C 2T5
http://tinyurl.com/r7uw4

boris at deepcovelabs.com

CONFIDENTIALITY NOTICE

This email is intended only for the persons named in the message header.
Unless otherwise indicated, it contains information that is private and
confidential. If you have received it in error, please notify the sender
and delete the entire message including any attachments.

Thank you.

-----Original Message-----
From: seaside-bounces at lists.squeakfoundation.org
[mailto:seaside-bounces at lists.squeakfoundation.org] On Behalf Of Lukas
Renggli
Sent: Tuesday, November 11, 2008 11:38 PM
To: Seaside - general discussion
Subject: Re: [Seaside] General subclassing question with regards
tocallbacks...

>        "Override the onClick: method to do what we want..."
>        html tableRow id: rowstr;
>                class:  (self classForRowNumber: index);
>                script: (self componentScriptOn: index);
>                with: [
>                                html anchor onClick: (html updater id:
> rowstr; callback: [:r |
>                                        self renderCompOn: r]); with:
> 'fooBar'.
>                                columns do: [:ea | self renderColumn:
ea row:
> row on: html].
>                        ]

You can't put an anchor tag in-between table rows and table cells.
Tables have a very strict nesting policy (see
http://www.w3.org/TR/REC-html40/struct/tables.html). A minimal valid
HTML table looks like this:

#table
     #tableBody (exactly one)
          #tableRow (one or more)
                #tableData or #tableHeading (one or more)

Actually there are a couple of more things to consider, but that is the
basics.

Note that the #onClick: Javascript event you can define on any DOM
node. Only if you want to use a traditional #callback: you need to use
an anchor.

Lukas

>
> <a href="javascript:void(0)" onclick="new
>
Ajax.Updater('row1','http://localhost/seaside/foo',{'evalScripts':true,'
parameters':['_s=WtzsCxCrreiqkTeX','_k=UIrMuNmm','10'].join('&')})">fooB
ar</a>
> <a href="javascript:void(0)" onclick="new
>
Ajax.Updater('row2','http://localhost/seaside/foo',{'evalScripts':true,'
parameters':['_s=WtzsCxCrreiqkTeX','_k=UIrMuNmm','11'].join('&')})">fooB
ar</a>
> <table id="tableSelectable" cellspacing="0" cellpadding="5">
> [ ... ]
> </table>
>
>
> On Nov 11, 2008, at 7:17 AM, Richard E. Flower wrote:
>
>> Thanks Lukas.. I'll look into doing that.. I figured it was something
>> stupid I was overlooking!
>> Too much late night coding!
>>
>> -- Rick
>>
>> On Nov 11, 2008, at 1:45 AM, Lukas Renggli wrote:
>>
>>>>     "Override the onClick: method to do what we want..."
>>>>     html tableRow id: 'row' , index asString;
>>>>             class:  (self classForRowNumber: index);
>>>>             script: (self componentScriptOn: index);
>>>>              onClick: [ self clickBlock ];
>>>>             with: [columns
>>>>                             do: [:ea | self
>>>
>>> #onClick: expects a Javascript string or object. #onClick is a HTML
>>> event attribute. You need to wrap the contents of your cells into an
>>> anchor that uses the block as a #callback:, or restort to JavaScript
>>> (AJAX).
>>>
>>> Cheers,
>>> Lukas
>>>
>>> --
>>> Lukas Renggli
>>> http://www.lukas-renggli.ch
>>> _______________________________________________
>>> 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
>>
>
> _______________________________________________
> seaside mailing list
> seaside at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>



-- 
Lukas Renggli
http://www.lukas-renggli.ch
_______________________________________________
seaside mailing list
seaside at lists.squeakfoundation.org
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside


More information about the seaside mailing list