classafFormBean::SkinCtx
sys::Obj afFormBean::SkinCtx
Passed to InputSkins to provide all the information they need to render a form field.
- bean
Obj? bean { internal set }The bean instance being rendered.
- beanInvalid
Bool beanInvalid()Returns
trueif the bean is invalid; that is, if any field is in error.- errMsg
Str? errMsg()Returns the error message associated with this field.
- field
const Field fieldThe corresponding bean field.
- fieldInvalid
Bool fieldInvalid()Returns
trueif the field is invalid. Note that if invalid, the field may not have an error msg.- fieldValue
Obj? fieldValue()Returns the field value.
- formBean
FormBean formBean { internal set }The containing
FormBeaninstance.- formField
FormField formField { internal set }The
FormFieldbeing rendered.- label
Str label()Returns the preferred display label associated with the field.
- name
Str name()Returns the name of the field. Safe for use as an ID / CSS class name.
- renderAttributes
Str renderAttributes([Str:Str]? extraAttributes := null)Returns a rendered string of common attributes to be placed in the
<input>HTML tag. This includesid,nameand any validation attributes defined on theHtmlInputfacet.Note the string does not contain the
typeorvalueattributes as these are dependent on the input type.The given
extraAttributesare merged in, allowing you to pass in extra css styles:attrs := skinCtx.renderAttributes(["autocomplete" : "off"])
Note that empty string values are rendered as HTML5 empty attributes.
- toClient
Converts the given value to a string using the preferred
ValueEncoder.- value
Str value()Returns the preferred string value to be rendered in the
<input>.