On Sep 22, 9:13 am, philip <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I have some questions as I have been developing and reading examples.
>
> 1. How can I put validation error messages next to the fields
> themselves?

Please see notices/error/warnings. For instance S.error("msgid", "an
error") and int your page you can put:

<lift:msg id="msgid" errorClass="error_class"
warningClass="warning_class"/> anywhere  ... probably near by your
form field.

>
> 2. Is there any example of use of the controller directory, I saw the
> directory in one example but no files in it. I understand from a
> previous email I read that controllers are not preferred as there may
> be many controls on a single page.

Might be .. I'm not sure. But I never had to use them since function
bindings, DispathPf, LiftView ... brought everything I ever needed :D

>
> 3. Why does stateful snippit have a dispatch but other snippits do
> not. Is there any other information about dispatch around?

dispatch function is a nice way of invoking snippet functions with no
reflection. Since "stateless" snippets are not required to implement
any interface the snippets functions are invoked using reflection.

>
> 4. For the DB, it is lazy loading? ie, if I navigate from one object
> to another does it query DB when I navigate down a mapped class to
> class relationship?
>
> 5. Why do you use Can[] for some variables in examples and in other
> cases you do not. In particular in stateful snippet in example you do
> not use Can[] but in HellForm you do use Can[] when it is a normal
> snippet.

Cans are just a cool way to express existence/non-existence of a
value. Often they are used to avoid null reference testing etc. A can
can be Empty or Full ... well there is also a Failure which is in fact
an Empty Can.

>
> 6. Are Can's compatible with normal Scala Some None?

there are implicit functions from converting a Can to/from Option. You
can also have Can(Some("asdfsdfg"))

>
> 7. Why are the DB classes named as such, MappedString,
> MetaMegaProtoUser. Mapped makes sense, its mapped to the database
> right. Meta Mega Proto seems, complex, what does it mean?
>
> 8. It seems I prefer bind method over having XML for form in the
> class. Does anyone have reasons for and against either method?

Bind is the right way to generate dynamic content on top of your
template. I don't recommend using a lot of markup generated in Scala
code. This should be minimized and AFAIC bind is doing a really great
job.

>
> Thanks, Philip
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Lift" 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/liftweb?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to