Jim Barrows
unread,Dec 5, 2009, 10:55:09 AM12/5/09Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to lif...@googlegroups.com
This is the basic definition of the form that works, but submits the page:
xhtml:
<lift:PartyContactMechanismSnippets.save form="post">
<!-- Form fields -->
<contactMechanism:submit/>
</lift:PartyContactMechanismSnippets.save>
And the binding looks like:
bind("contactMechanism", xhtml,
"comment" -> text(comment, comment = _),
"fromDate" -> text(fromDate, fromDate = _) % ("id" -> "fromDate") % ("maxlength" -> "15") % ("size" -> "15"),
"thruDate" -> text(thruDate, thruDate = _) % ("id" -> "thruDate") % ("maxlength" -> "15") % ("size" -> "15"),
"submit" -> submit("Add", saveContactMechanismToParty ))
So, after reading the ajaxForm methods description I thought I could do this:
xhtml:
<lift:PartyContactMechanismSnippets.save >
<!-- Form fields -->
<contactMechanism:submit/>
</lift:PartyContactMechanismSnippets.save>
And the binding would look like:
ajaxForm( bind("contactMechanism", xhtml,
"comment" -> text(comment, comment = _),
"fromDate" -> text(fromDate, fromDate = _) % ("id" -> "fromDate") % ("maxlength" -> "15") % ("size" -> "15"),
"thruDate" -> text(thruDate, thruDate = _) % ("id" -> "thruDate") % ("maxlength" -> "15") % ("size" -> "15"),
//"mechanism" -> text(dateFormat.format(new Date()), thruDate = _) % ("id" -> "thruDate") % ("maxlength" -> "10") % ("size" -> "10"),
"submit" -> submit("Add", saveContactMechanismToParty )))
However, when the submit button is clicked the saveContactMechanismToParty never gets called.
What am I missing?
--
James A Barrows