emailField

emailField is a standard textField that accepts only email addresses as input.

  • XML element: emailField

  • Java class: JmixEmailField

Basics

An example of emailField:

<emailField errorMessage="Enter a valid email address"
            value="john.doe@email.com"
            clearButtonVisible="true"
            label="Email address"
            width="15em"/>
email field basics

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:

  1. Specify the name of the data container as the dataContainer attribute value.

  2. 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>

Handlers

Чтобы сгенерировать заглушку обработчика в Jmix Studio, используйте вкладку Handlers панели инспектора Jmix UI, или команду Generate Handler, доступную на верхней панели контроллера экрана и через меню CodeGenerate (Alt+Insert / Cmd+N).

Elements

See Also

See the Vaadin Docs for more information.