[Seaside] generating dynamic id:#name for component inside a table
Robert Sirois
watchlala at hotmail.com
Sat Nov 20 15:33:23 UTC 2010
If your x and y objects don't have unique IDs themselves, try something along these lines (just keep in mind, nothing will "remember" (keep state for the IDs) which one is which, but they will be in a logical order at least).
| xID yID | xID := 0. yID := 0.
html table: [ collection1 do: [ :x | xID := xID + 1. html tableRow: [
collection2 do: [:y | yID := yID + 1.
html tableData: [
html checkBox id: xID asString, 'x', yID asString; " ... "
] ] ] ]].
(Subject to errors as I don't have Smalltalk up)RS
Date: Sat, 20 Nov 2010 13:15:06 +0100
From: gschtick at gmail.com
To: seaside at lists.squeakfoundation.org
Subject: [Seaside] generating dynamic id:#name for component inside a table
Hello,
I have a table built like this
html table: [
collection1 do: [ :x |
html tableRow: [ collection2 do: [:y |
html tableData: [ html checkBox
id: #checkBoxName
.....] ] ] ] ]
What I'd like is to have a different #checkBoxName for each so I can set one depending of the function of the other with a ((html jQuery: #checkBoxNameXY) attributeAt: 'checked' put: (html jQuery this attributeAt: 'disabled')) or something like it.
How should I proceed to achieve this?
Thanks
Gilles
_______________________________________________
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://lists.squeakfoundation.org/pipermail/seaside/attachments/20101120/3b43b582/attachment.htm
More information about the seaside
mailing list