| OVERVIEW | PACKAGE | CONSTR | FIELDS | METHODS | FRAMES NO FRAMES | INHERITED |
trait Field[ThisType, OwnerType <: Record[OwnerType]]
extends
OwnedField[OwnerType] with TypedField[ThisType]
| allFields.. |
def allFields
|
Seq[BaseField] | BaseField |
| asHtml.. |
def asHtml
|
NodeSeq | ReadableField |
| asJValue.. |
abstract def asJValue
Encode the field value into a JValue
|
JValue | BaseField |
| asJs.. |
abstract def asJs
Returns the field's value as a valid JavaScript expression
|
JsExp | BaseField |
| asString.. |
def asString
Convert the field to a String
[details]
.. usually of the form "displayName=value"
|
String | TypedField |
| canRead_?.. |
def canRead_?
Can the value of this field be read without obscuring the result?
|
Boolean | BaseField |
| canWrite_?.. |
def canWrite_?
Can the value of this field be written?
|
Boolean | BaseField |
| checkCanRead_?.. |
def checkCanRead_?
If the owner is not in "safe" mode, check the current environment to see if
the field can be read
|
Boolean | BaseField |
| checkCanWrite_?.. |
def checkCanWrite_?
If the owner is not in "safe" mode, check the current environment to see if
the field can be written
|
Boolean | BaseField |
| defaultValueBox.. |
abstract def defaultValueBox
The default value of the field when no value is set
[details]
Must return a Full Box unless optional_? is true
|
Box[ThisType] | TypedField |
| dirty_?.. |
def dirty_?
|
Boolean | BaseField |
| displayHtml.. |
def displayHtml
|
NodeSeq | ReadableField |
| displayName.. |
def displayName
|
String | ReadableField |
| displayNameHtml.. |
def displayNameHtml
|
Box[NodeSeq] | ReadableField |
| fieldId.. |
def fieldId
|
Option[NodeSeq] | SettableField |
| get.. |
abstract def get
|
ValueType | ValueHolder |
| helpAsHtml.. |
def helpAsHtml
|
Box[NodeSeq] | SettableField |
| ignoreField_?.. |
def ignoreField_?
Should the field be ignored by the OR Mapper?
|
Boolean | BaseField |
| is.. |
abstract def is
|
ValueType | ValueHolder |
| label.. |
def label
|
NodeSeq | BaseField |
| name.. |
def name
The text name of this field
|
String | BaseField |
| noValueErrorMessage.. |
def noValueErrorMessage
The error message used when the field value could not be set
|
String | BaseField |
| notOptionalErrorMessage.. |
def notOptionalErrorMessage
The error message used when the field value must be set
|
String | BaseField |
| optional_?.. |
def optional_?
Is the value of this field optional (e
[details]
g. NULLable)?
|
Boolean | BaseField |
| owner.. |
abstract def owner
Return the owner of this field
|
OwnerType | OwnedField |
| required_?.. |
def required_?
|
Boolean | SettableField |
| safe_?.. |
override final def safe_?
Are we in "safe" mode (i
[details]
e., the value of the field can be read or written without any security checks.)
|
Boolean | OwnedField |
| shouldDisplay_?.. |
def shouldDisplay_?
|
Boolean | ReadableField |
| show_?.. |
def show_?
|
Boolean | SettableField |
| tabIndex.. |
def tabIndex
|
Int | BaseField |
| toForm.. |
abstract def toForm
Generate a form control for the field
|
Box[NodeSeq] | BaseField |
| toXHtml.. |
def toXHtml
Convert the field value to an XHTML representation
|
NodeSeq | BaseField |
| uniqueFieldId.. |
override def uniqueFieldId
|
Box[String] | BaseField |
| uploadField_?.. |
def uploadField_?
|
Boolean | SettableField |
| validate.. |
def validate
Validate this field's setting, returning any errors found
|
List[FieldError] | TypedField |
| valueBox.. |
def valueBox
|
Box[ThisType] | TypedField |
| !=.. |
final def !=(arg0 : Object)
|
Boolean | AnyRef |
| !=.. |
final def !=(arg0 : Any)
|
Boolean | Any |
| ==.. |
final def ==(arg0 : Any)
|
Boolean | Any |
| ==.. |
final def ==(arg0 : Object)
|
Boolean | AnyRef |
| apply.. |
def apply(in : Box[ThisType])
|
OwnerType | |
| apply.. |
def apply(in : ThisType)
|
OwnerType | |
| asInstanceOf.. |
final def asInstanceOf[T0]
|
T0 | Any |
| asJString.. |
protected def asJString(encode : (ThisType) => String)
Helper for implementing asJValue for a conversion to an encoded JString
[details]
|
JValue | TypedField |
| boxNodeFuncToFieldError.. |
protected implicit def boxNodeFuncToFieldError(in : (Box[ThisType]) => Box[Node])
|
(Box[ThisType]) => List[FieldError] | TypedField |
| boxNodeToFieldError.. |
protected implicit def boxNodeToFieldError(in : Box[Node])
|
List[FieldError] | TypedField |
| clear.. |
def clear
Clear the value of this field
|
Unit | TypedField |
| clone.. |
protected def clone
|
Object | AnyRef |
| dirty_?.. |
protected def dirty_?(b : Boolean)
|
Unit | BaseField |
| eq.. |
final def eq(arg0 : Object)
|
Boolean | AnyRef |
| equals.. |
def equals(arg0 : Any)
|
Boolean | AnyRef |
| finalize.. |
protected def finalize
|
Unit | AnyRef |
| genericSetFromAny.. |
protected final def genericSetFromAny(in : Any)(implicit m : Manifest[ThisType])
Generic implementation of setFromAny that implements exactly what the doc for setFromAny specifies, using a Manifest to check types
|
Box[ThisType] | TypedField |
| getClass.. |
final def getClass
|
Class[Any] | AnyRef |
| hashCode.. |
def hashCode
|
Int | AnyRef |
| isInstanceOf.. |
final def isInstanceOf[T0]
|
Boolean | Any |
| liftSetFilterToBox.. |
protected abstract def liftSetFilterToBox(in : Box[ThisType])
OptionalTypedField and MandatoryTypedField implement this to do the appropriate lifting of Box[MyType] to ValueType
|
Box[ThisType] | TypedField |
| ne.. |
final def ne(arg0 : Object)
|
Boolean | AnyRef |
| nodeToFieldError.. |
protected implicit def nodeToFieldError(node : Node)
|
List[FieldError] | TypedField |
| notify.. |
final def notify
|
Unit | AnyRef |
| notifyAll.. |
final def notifyAll
|
Unit | AnyRef |
| obscure.. |
def obscure(in : ThisType)
|
Box[ThisType] | TypedField |
| resetDirty.. |
def resetDirty
|
Unit | BaseField |
| runFilters.. |
def runFilters(in : Box[ThisType], filter : List[(Box[ThisType]) => Box[ThisType]])
|
Box[ThisType] | TypedField |
| runValidation.. |
protected def runValidation(in : Box[ThisType])
Helper function that does validation of a value by using the validators specified for the field
|
List[FieldError] | TypedField |
| set.. |
abstract def set(arg0 : ValueType)
|
ValueType | Settable |
| setBox.. |
def setBox(in : Box[ThisType])
|
Box[ThisType] | TypedField |
| setFilter.. |
protected def setFilter
|
List[(ValueType) => ValueType] | TypedField |
| setFilterBox.. |
protected def setFilterBox
A list of functions that transform the value before it is set
[details]
The transformations
are also applied before the value is used in a query. Typical applications
of this are trimming and/or toLowerCase-ing strings
|
List[(Box[ThisType]) => Box[ThisType]] | TypedField |
| setFromAny.. |
abstract def setFromAny(in : Any)
Set the value of the field from anything
[details]
Implementations of this method should accept at least the following (pattern => valueBox)
- value: MyType => setBox(Full(value))
- Some(value: MyType) => setBox(Full(value))
- Full(value: MyType) => setBox(Full(value))
- (value: MyType)::_ => setBox(Full(value))
- s: String => setFromString(s)
- Some(s: String) => setFromString(s)
- Full(s: String) => setFromString(s)
- null|None|Empty => setBox(defaultValueBox)
- f: Failure => setBox(f)
And usually convert the input to a string and uses setFromString as a last resort.
Note that setFromAny should _always_ call setBox, even if the conversion fails. This is so that validation
properly notes the error.
The method genericSetFromAny implements this guideline.
|
Box[ThisType] | TypedField |
| setFromJString.. |
protected def setFromJString(jvalue : JValue)(decode : (String) => Box[ThisType])
Helper for implementing setFromJValue for a conversion from an encoded JString
[details]
|
Box[ThisType] | TypedField |
| setFromJValue.. |
abstract def setFromJValue(jvalue : JValue)
Decode the JValue and set the field to the decoded value
[details]
Returns Empty or Failure if the value could not be set
|
Box[ThisType] | TypedField |
| setFromString.. |
abstract def setFromString(s : String)
Set the value of the field using some kind of type-specific conversion from a String
[details]
By convention, if the field is optional_?, then the empty string should be treated as no-value (Empty).
Note that setFromString should _always_ call setBox, even if the conversion fails. This is so that validation
properly notes the error.
|
Box[ThisType] | TypedField |
| set_!.. |
protected def set_!(in : Box[ThisType])
|
Box[ThisType] | TypedField |
| synchronized.. |
final def synchronized[T0](arg0 : T0)
|
T0 | AnyRef |
| toBoxMyType.. |
protected abstract def toBoxMyType(in : ValueType)
|
Box[ThisType] | TypedField |
| toString.. |
def toString
|
String | AnyRef |
| toValueType.. |
protected abstract def toValueType(in : Box[ThisType])
|
ValueType | TypedField |
| validations.. |
def validations
|
List[Function1] | TypedField |
| wait.. |
final def wait(arg0 : Long, arg1 : Int)
|
Unit | AnyRef |
| wait.. |
final def wait
|
Unit | AnyRef |
| wait.. |
final def wait(arg0 : Long)
|
Unit | AnyRef |
| OVERVIEW | PACKAGE | CONSTR | FIELDS | METHODS | FRAMES NO FRAMES | INHERITED |