emailField
Basics
An example of emailField
:
<emailField errorMessage="Enter a valid email address"
value="john.doe@email.com"
clearButtonVisible="true"
label="Email address"
width="15em"/>
Data Binding
You can bind a component to an entity and its attributes hold in a data container.
To bind emailField
to an entity attribute:
-
Specify the name of the data container as the dataContainer attribute value.
-
Specify the name of the entity attribute as the property attribute value.
<data>
<instance class="com.company.onboarding.entity.Customer" id="customerDc">
<fetchPlan extends="_base"/>
<loader id="customerDl"/>
</instance>
</data>
<layout>
<emailField dataContainer="customerDc"
property="email"
label="Email"/>
</layout>
Attributes
id - allowedCharPattern - autocapitalize - autocomplete - autocorrect - autofocus - autoselect - classNames - clearButtonVisible - colspan - css - dataContainer - enabled - errorMessage - height - helperText - invalid - label - maxHeight - maxLength - maxWidth - minHeight - minLength - minWidth - pattern - placeholder - property - readOnly - required - requiredIndicatorVisible - requiredMessage - tabIndex - themeNames - title - value - valueChangeMode - valueChangeTimeout - visible - width
Handlers
AttachEvent - BlurEvent - ClientValidatedEvent - ComponentValueChangeEvent - CompositionEndEvent - CompositionStartEvent - CompositionUpdateEvent - DetachEvent - FocusEvent - InputEvent - KeyDownEvent - KeyPressEvent - KeyUpEvent - statusChangeHandler - validator
To generate a handler stub in Jmix Studio, use the Handlers tab of the Jmix UI inspector panel or the Generate Handler action available in the top panel of the view class and through the Code → Generate menu (Alt+Insert / Cmd+N). |
See Also
See the Vaadin Docs for more information.