Create an object or val that is a subclass of the FactoryMaker to generate factory for a particular class as well as define session and request specific vendors and use doWith to define the vendor just for the scope of the call.
A field that's part of a Screen
Create an object or val that is a subclass of the FactoryMaker to generate factory for a particular class as well as define session and request specific vendors and use doWith to define the vendor just for the scope of the call.
Keep request-local information around without the nastiness of naming session variables or the type-unsafety of casting the results.
What to do when the Screen is done.
A little hack because => BaseField and => Box[BaseField] have the same method signature
A unique GUID for the form.
Override the screen default for fields appearing on the confirm screen and force this field not to appear on the confirm screen
Override the screen default for fields appearing on the confirm screen and force this field to appear on the confirm screen
Holds the template passed via the snippet for the duration of the request
Add a FieldContainer to the Screen.
Add a FieldContainer to the Screen. A FieldContainer
can contain either a single field (a BaseField) or
a collection of BaseFields. The key take-away is that
if the LiftScreen or Wizard is a singleton, you can still
display variable number of fields by returning a variable
number of BaseField instances from the FieldContainer.
WARNING -- this method is public so it can be called
from a Wizard. This method should only be called from within
the Screen or Wizard that owns the Screen and not
from external code.
Any additional parameters that need to be put on the form (e.
Any additional parameters that need to be put on the form (e.g., mime type)
Are the forms Ajax or regular HTTP/HTML.
Are the forms Ajax or regular HTTP/HTML.
If the ajax=true attribute is present on the original snippet invocation, the forms will be ajax.
Create a FieldBuilder so you can add help screens, validations and filters.
Create a FieldBuilder so you can add help screens, validations and filters. Remember to invoke "make" on the returned FieldBuilder to convert it into a field
- the name of the field. This is a call-by-name parameter, so you can dynamically calculate the name of the field (e.g., localize its name)
- the default value of the field
- any filter or validation functions
Calculate if this Screen/Wizard should be ajax
Calculate if this Screen/Wizard should be ajax
What should be done at the end of an Ajax session.
What should be done at the end of an Ajax session. By default, RedirectTo(Referer.get)
Calculate the referer (the page to go back to on finish).
Calculate the referer (the page to go back to on finish). defaults to S.referer openOr "/"
Should all instances of this Wizard or Screen default to Ajax when not explicitly set
Should all instances of this Wizard or Screen default to Ajax when not explicitly set
the NodeSeq passed as a parameter when the snippet was invoked
the NodeSeq passed as a parameter when the snippet was invoked
Create a field with a name, default value, and
Create a field with a name, default value, and
- the name of the field. This is a call-by-name parameter, so you can dynamically calculate the name of the fiels (e.g., localize its name)
- the default value of the field
What additional attributes should be put on
What additional attributes should be put on
Grabs the FormFieldId and FormParam parameters
Grabs the FormFieldId and FormParam parameters
Perform the injection for the given type.
Perform the injection for the given type. You can call: inject[Date] or inject[List[Map[String, PaymentThing]]]. The appropriate Manifest will be
create an anchor tag around a body
create an anchor tag around a body
- the target
- the function to invoke when the link is clicked
- the NodeSeq to wrap in the anchor tag
- the (optional) attributes for the HTML element
Override this method to do any setup of this screen
Override this method to do any setup of this screen
Create a field that's added to the Screen
Create a field that's added to the Screen
- the name of the field. This is call-by-name, so you can do things like S.?("Dog's Name") such that the string will be localized
- the starting value for the field. This is
also call-by-name which is handy for constructs like:
SomeExternalRequestVarOrSessionVar.get
a newly minted Field
Create a multi select HTML element
Create a multi select HTML element
the name of the field (call-by-name)
the starting value of the field (call-by-name)
the possible choices for the select
- a list of filters and validations for the field
a PairStringPromoter (a wrapper around a function) that converts T => display String
a newly minted Field{type ValueType = String}
By default, are all the fields on this screen on the confirm screen?
By default, are all the fields on this screen on the confirm screen?
Create a password field
Create a password field
the name of the field (call-by-name)
the starting value of the field (call-by-name)
the filters, validators and attributes
a newly minted Field
Create a radio HTML element
Create a radio HTML element
the name of the field (call-by-name)
the starting value of the field (call-by-name)
the possible choices for the select
- a list of filters and validations for the field
a newly minted Field{type ValueType = String}
Redirect to another page, but make sure this StatefulSnippet is registered on that page so the state continues on the new page
Redirect to another page, but make sure this StatefulSnippet is registered on that page so the state continues on the new page
Register a function that will inject for the given Manifest
Register a function that will inject for the given Manifest
A list of fields in this screen
A list of fields in this screen
The name of the screen.
The name of the screen. Override this to change the screen name.
See Other to another page, but make sure this StatefulSnippet is registered on that page so the state continues on the new page
See Other to another page, but make sure this StatefulSnippet is registered on that page so the state continues on the new page
Create a select HTML element
Create a select HTML element
the name of the field (call-by-name)
the starting value of the field (call-by-name)
the possible choices for the select
- a list of filters and validations for the field
a PairStringPromoter (a wrapper around a function) that converts T => display String
a newly minted Field{type ValueType = String}
Create a text field
Create a text field
the name of the field (call-by-name)
the starting value of the field (call-by-name)
the filters, validators and attributes
a newly minted Field
Create a textarea field
Create a textarea field
the name of the field (call-by-name)
the starting value of the field (call-by-name)
the number of rows in the textarea
the number of columns in the textarea
- a list of filters and validations for the field
a newly minted Field{type ValueType = String}
Create a textarea field with 80 columns and 5 rows
Create a textarea field with 80 columns and 5 rows
the name of the field (call-by-name)
the starting value of the field (call-by-name)
- a list of filters and validations for the field
a newly minted Field{type ValueType = String}
A validation helper.
A validation helper. Make sure the string is no more than a particular length and generate a validation issue if not.
A validation helper.
A validation helper. Make sure the string is at least a particular length and generate a validation issue if not.
Make sure the field matches a regular expression
Make sure the field matches a regular expression
Use addFields
Use addFields
(Since version 2.4) use addFields()