FieldGroup with link to Null reference is clickable and will show the instance itself

Hi,

i encountered a bug with the following scenario:
I have a Customer class that has a one to one relationship to an Address class. The Address is the owning side. Now i create default screens for both of the entities with the correct views that additionally fetches the references.

Now i created the following editor for the Customer class:


        <fieldGroup id="fieldGroup"
                    datasource="customerDs">
            <column width="250px">
                <field id="name"/>
                <field id="address"
                       editable="false"
                       link="true"
                       linkScreenOpenType="DIALOG"/>
            </column>
        </fieldGroup>

Now, if i have a customer that has no address instance associated to it the following situation occurs:
I can click on about 5px element (that has no content and therefore is invisible. I only see it because the cursor icon changes). if i do that a screen will open in a DIALOG as i specified, but it will be the editor of the customer that i already opened.

The expected behavior would be:
I can’t click on anything because there is no address.

Attached you’ll find the example project as well as a screen share about this situation.

Bye
Mario

field-group-link-null.gif (359.2K)

cuba-problem-field-group-link-null.zip (40.0K)

Hi Mario,

Thank you for reporting the problem. The link to the corresponding YouTrack issue is on the right.

:ticket: See the following issue in our bug tracker:

https://youtrack.cuba-platform.com/issue/PL-8557