|Newbie questions about Pliant
Asking date several times
My db has a date field of type Date.
How do I fill it through a form ?
|Message posted by maybe Boris Reitman on 2005/10/01 04:19:37
|I have several records the number of which I
know when my page is invoked. (These records represend recipients).
For each record I want to create the html selection for a date.
Drop down for a day, month and year.
It seems to me that I need to ask for year, month and day separately
using some other variables, and then use them to initialize the date.
If it was just one date field I would know to create three variables
whoes names I know: day, month, year and use the later to init the date object
in the db.
But how would I do it with a loop if I have to go throught several date questions?
Do I have to use a Set:* database, or another database ? Because, if
I understand correctly structures such as Array are not supported
for input tag.
|Message posted by hubert.tonneau on 2005/10/01 09:10:51
|Right. This the weakest point of the current .page:
If you have a set of records that you display in a table, then you can't have
one field per row that would change something in a local complex variable
(I mean a List:xxx Array:xxx Dictionary:xxx Index:xxx)
There is no such problem with the Pliant browser, but this is another story,
and not a decent answer to your question.
We should extend 'input' support in .page so that the edited variable might
be part of a larger structure, but it's significant work and I have no plan
to do it at the moment.
The short term solution is to have a temporary database, get a new key with
'generate_id', create the corresponding new record, then since you edit database
fields, you can use any complex structure you want.
Also, you have to do garbadge on the temporary database from time to time.