[Seaside] Need some table help

Esteban A. Maringolo emaringolo at gmail.com
Fri Jul 14 17:00:55 UTC 2017


You can do some ajax replacement there, replacing the whole row every
time you change the selection.


Below some untested code that should lead you in the right direction.

renderRowOn: html

html tableRow
  id: (rowId := html nextId);
  with: [
    self renderCellsRowId: rowId on: html
]


renderCellsRowId: rowId on: html
   html tableData: aWvPick gameNumber.
   html tableData: aWvPick time.
   html tableData: aWvPick home.
   html tableData: aWvPick away.
   html tableData: aWvPick currentPick"show the current pick here"
   html tableData: [
       html select
          "... select options and configs "
           onClick: (
            (html jQuery ajax
                callback: ["whatever you do when the select changes"]
value: ("what you chose as value");
                onSuccess: (html jQuery id: rowId) load: [:h | self
renderCellsRowId: rowId on: h ])
          )
   ]


Esteban A. Maringolo


2017-07-14 12:32 GMT-03:00 Donald MacQueen <dmacq at erols.com>:
> I am a relative Seaside newbie. I am trying to get up to speed by writing a
> small app to support our football club.
>
> I have a table of game data. Each row has
>
> game# time homeTeam awayTeam currentPick
>
> What i want to do is add a combo box as the sixth element in the table row
> which would have two selections: the homeTeam and the awayTeam. After
> selecting a pick, I want to update the row to show the new value for aWvPick
> currentPick, the fifth element.
>
> I have googled my brains out looking for an example and  have grepped the
> last 3 years of the archives, but no joy so far. My table looks like this:
>
>     html tableRow: [
>         html tableData: aWvPick gameNumber.
>         html tableData: aWvPick time.
>         html tableData: aWvPick home.
>         html tableData: aWvPick away.
>         html tableData: aWvPick currentPick"show the current pick here"
>
> "want to put combo box here"].
>
> Thanks in advance.
>
> --
> Donald [|]
>
> This is a job for BOB VIOLENCE and SCUM, the INCREDIBLY STUPID MUTANT DOG.
>                 -- Bob Violence
>
>
> ---
> This email has been checked for viruses by Avast antivirus software.
> https://www.avast.com/antivirus
>
> _______________________________________________
> seaside mailing list
> seaside at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside


More information about the seaside mailing list