[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Help-smalltalk] Re: html element id facility?
From: |
Stefan Schmiedl |
Subject: |
Re: [Help-smalltalk] Re: html element id facility? |
Date: |
Fri, 26 Jun 2009 13:02:37 +0200 |
On Fri, 26 Jun 2009 12:42:37 +0200
Nicolas Petton <address@hidden> wrote:
> Le vendredi 26 juin 2009 à 09:23 +0200, Stefan Schmiedl a écrit :
> > Hi Nico,
> >
>
> Hi Stefan,
>
>
> > does Iliad have any facility for generating unique element ids
> > (like nextId in Seaside)?
> >
>
> Yes, you can use Iliad.Id or Iliad.Session>>nextId
>
> e div id: self session nextId.
> e div id: Id new.
Will I break something if I stupidly mix these two different ways?
>
> > I've been brooding about how to work with labels and checkboxes
> > being used in a list of multiple choice questions.
>
> Maybe I should write something about forms and actions in Iliad?
You can write whatever you want on Iliad, I'll read it :-)
> It basically works like anchors:
>
> | form |
> form := e form.
> form checkbox
> action: [:boolean | self doSomethingWith: boolean];
> checked: true.
> form button
> text: 'submit'
I am coming to this later today .-)
My current plan is to _not_ use any forms, instead have every
radiobutton submit a request to the server after being activated.
Probably some
e radioButton onChange: [...]
thing I assume.
On a side note:
I'll have lots of places showing things like
6*9=42 o true o false o don't know
hence I feel the strong need for collecting label and radiobutton into
a single object, which would be descendant of Element, right?
Ideally, I'll end today having code like
[:e |
e text: '6*9=42'.
model answers do: [ :a |
e radioButton: a label; onChange: [ whatever: a value ]
]
]
Thanks,
s.
signature.asc
Description: PGP signature