>
> Weblocks newbie here.  I just started my first webapp, and would
> greatly appreciate some guidance.  Here's what I have so far:
>

First, welcome!


> http://pastie.org/971913
>
>
Your defclass form seems incorrect.


> I'm trying to guide the user through a series of pages each with a
> simple question (sex, age, etc).  All the while I want to build up a
> 'user' object that represents them.  For now, I'm not interested in
> persisting this object through sessions.
>

As Leslie said, it's more straightforward to use a wizard interface here (or
what WordPerfect would call Coaches, iirc!)

Just use weblocks forms and views as normal, and use separate forms at each
step of the wizard. A wizard will (afaik) also work properly when javascript
is disabled.


> Trouble is, I'm not sure how to pass this object from page to page.
> Do I attach it to the root composite?
>
>
If you really want to do it through continuations, that's easy too.

In the code here <http://pastie.org/972357>, I've been lazy and used
&optional instead of a let binding like I should have, but the effect is the
same. So the answer is: make the user-object in init-user-session using let.

Some notes:
1. make-widget is just a convenience for wrapping a render fn. into a
widget..
2. as you can see I've punted on rendering an input box for age.. because
that stuff's really easy with forms. It is also fairly simple to make a
dropdown modify a slot-value in a lisp object using javascript... assuming
you wanted to enumerate all possible ages in a dropdown!

cheers,
 Nandan

-- 
You received this message because you are subscribed to the Google Groups 
"weblocks" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/weblocks?hl=en.

Reply via email to