-
Notifications
You must be signed in to change notification settings - Fork 0
Adds ajax form functionality to a Lift Record
License
coryhammon1/AjaxFormable
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
Description: AjaxFormable is a scala trait that adds ajax form functionality to a Lift Record class. Usage: Add the trait to your Record and MetaRecord classes, override the formFields attribute, and call the toAjaxForm function in the appropriate html. Example: class Bulletin extends Record[Bulltin] with AjaxFormable[Bulletin] { def meta = Bulletin object title extends StringField(this, 64) object text extends TextareaField(this, 256) override def formFields = List("title", "text") override def toXHtml = this.toAjaxForm(Full("Change Bulletin")) { bulletin => bulletin.save() Alert("Bulletin was changed successfully.") } } object Bulletin extends Bulletin with AjaxFormableMeta[Bulletin] { def getCreationForm = ajaxCreationForm(Full("Add Bulletin")) { bulletin => bulletin.save() Alert("Bulletin was added successfully.") } }
About
Adds ajax form functionality to a Lift Record
Resources
License
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published