Hi all,

I've got a following problem. When I create a form form automaticly..
similar to the User login/register example I encontered a problem I'm
not posible to cope with.

Firstly I have 'written' a function (using Copy&Paste method) which
creates a form fields list based on my class properties:

    private def localForm(place: Place, ignorePassword: Boolean):
NodeSeq = {
        signupFields.
        map(fi => getSingleton.getActualBaseField(place, fi)).
        filter(f => !ignorePassword || (f match {
                    case f: MappedPassword[Place] => false
                    case _ => true
                })).
        flatMap(f =>
            f.toForm.toList.map(form => <p><label>{f.displayName}</
label> {form}</p>) )
    }

Next, I wrote some code to return a complete form to the snippet:


    def newPlace(place: Place) =
    <form method="post" action={S.uri}>
        <h4>Place details</h4>
        <div>
            {
                localForm(place, false)
            }
        </div>
        <p><_WHAT_SHOULD_I_WRITE_HERE_:submit /></p>
    </form>


My question is... what do I write in _WHAT_SHOULD_I_WRITE_HERE_ ?
Or better.. how/where to define this value?

In a user login/register example there is submit defined like this:
<user:submit>

Placing there name of the owner class didn't work.
I know I could use bind but as far as I know next I should create a
complete snippet with all the fields by hand.. and I would to avoid
it.

I was digging for solution in a Lift Book and on group as well, but
without success.
Help!

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to liftweb@googlegroups.com
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to