maskedField not working

maskedField component not saving input value, and does not show already saved data value in editor screen, it also shows up as an empty editable field in view mode.

image
the TRN field should be showing pre saved data and not be editable.

 <maskedField id="trnField" mask="###-###-###" valueMode="masked" caption="TRN"/>

Hi.
If you want field connected to data, use dataContainer and property attributes.

<data>
    <instance id="customerDc" class="com.company.sales.entity.Customer" view="_local">
        <loader/>
    </instance>
</data>
<layout>
    <maskedField dataContainer="customerDc" property="name" caption="msg://name"/>
</layout>

As you can see in the example, the screen describes the customerDc data container for Customer entity, which has name attribute. The masked field component has a link to the container specified in the dataContainer attribute; property attribute contains the name of the entity attribute that is displayed in the masked field. If you add your field to Form you only have to specify property attribute.

Regards,
Natalia.

2 Likes

Thank you, i didn’t realize i that i hadn’t placed it there.