Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DataGridEditor gets columns by keys #3570

Open
KremnevDmitry opened this issue Aug 13, 2024 · 0 comments · May be fixed by #3853
Open

DataGridEditor gets columns by keys #3570

KremnevDmitry opened this issue Aug 13, 2024 · 0 comments · May be fixed by #3853
Assignees
Labels
in: flowui size: S type: bug Something isn't working

Comments

@KremnevDmitry
Copy link
Contributor

Environment

Jmix version: 2.3.999-SNAPSHOT

Bug Description

DataGridEditor gets columns by keys. In this case, it is implied that the column key will be equal to the value of the entity meta property name.

            <columns resizable="true">
                <column property="username" editable="true"/>
                <column key="firstname" property="firstName" editable="true"/>
                <column property="lastName"/>
                <column property="email"/>
                <column property="timeZoneId"/>
                <column property="active"/>
            </columns>

However, there may be cases when the key value is specified explicitly, then there will be an error here:

@Override
public void setColumnEditorComponent(String property,
Function<EditComponentGenerationContext<T>, Component> generator) {
Grid.Column<T> column = getGrid().getColumnByKey(property);
setColumnEditorComponent(column, property, generator);
}

Also, consider the case with repeating properties:

            <columns resizable="true">
                <column property="username" editable="true"/>
                <column key="username2" editable="true"/>
                <column property="firstName"/>
                <column property="lastName"/>
                <column property="email"/>
                <column property="timeZoneId"/>
                <column property="active"/>
            </columns>
@KremnevDmitry KremnevDmitry added type: bug Something isn't working triage Issue is waiting for triage labels Aug 13, 2024
@gorbunkov gorbunkov added size: S in: flowui and removed triage Issue is waiting for triage labels Aug 16, 2024
@knstvk knstvk moved this to Next in Release 2.4 Nov 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: flowui size: S type: bug Something isn't working
Projects
Status: Review
Development

Successfully merging a pull request may close this issue.

2 participants