[Seaside] Selectable Table

Boris Popov boris at deepcovelabs.com
Wed Oct 18 20:20:56 UTC 2006


I've implemented one for our application in the reporting framework by
adding conditional "row actions" to "reports" and rendering them in the
panel at the bottom of the report. Then, I would implicitly add a
"selection" column to the table that contains a checkbox for each "row".
That checkbox knows the "id" of the current "tr" as well as array of
"actions" that need to be disabled if this row is selected. Then an
"onClick" event wires it all together to call a small piece of
JavaScript that adds/removes a "selected" class to the "tr" depending on
the state of the checkbox as well as calls main action panel update
function that goes through all selection checkboxes in the report,
collects all actions that need to be disabled and enables the remaining
ones. It sounds complicated, but it only took a few hours of learning
Prototype (it helps a lot, really) and tweaking the JavaScript until it
worked.

 

As far as making this into a reusable component, I'm sure it could be
done, but its tied with the rest of our reporting right now and I don't
know if I'll ever have time to untangle it :(

 

Hope this helps,

-Boris

--
+1.604.689.0322
DeepCove Labs Ltd.
4th floor 595 Howe Street
Vancouver, Canada V6C 2T5

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.

From: seaside-bounces at lists.squeakfoundation.org
[mailto:seaside-bounces at lists.squeakfoundation.org] On Behalf Of Ron
Teitelbaum
Sent: Wednesday, October 18, 2006 1:09 PM
To: 'The Squeak Enterprise Aubergines Server - general discussion.'
Subject: [Seaside] Selectable Table

 

Hello all, 

 

I've been looking at adding a selectable table.  One that has
highlighted rows, highlights rows on mouse over and allows a click to
select the row.

 

By any chance does this already exist?  Is there a way to add a callback
to tableRow? 

 

Thanks for your help!

 

Ron Teitelbaum

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/seaside/attachments/20061018/ecebbe2f/attachment-0001.htm


More information about the Seaside mailing list