[Seaside] generating dynamic id:#name for component inside a table
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
I have a table built like this
html table: [
collection1 do: [ :x |
html tableRow: [ collection2 do: [:y |
html tableData: [ html checkBox
.....] ] ] ] ]
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?
seaside mailing list
seaside at lists.squeakfoundation.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the seaside