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

Implemented: Add group option on drow-down in xml screen form (OFBIZ-13157) #842

Merged
merged 3 commits into from
Oct 23, 2024

Conversation

nmalin
Copy link
Contributor

@nmalin nmalin commented Oct 21, 2024

When you define a drop-down field in xml form, add new optional level with group-options to organize options.

    <field name="group">
        <drop-down>
            <group-options description="A">
                <option key="A1" description="Ad1"/>
                <option key="A2" description="Ad2"/>
            </group-options>
            <group-options description="B">
                <option key="B1" description="Bd1"/>
                <option key="B2" description="Bd2"/>
            </group-options>
        </drop-down>
    </field>

Group-options can receive all options type :

    <field name="roleTypeId">
        <drop-down>
            <group-options description="Customer roles">
                <entity-options entity-name="RoleType">
                    <entity-constraint name="parentType" vale="CUSTOMER"/>
                </entity-options>
            </group-options>
            <group-options description="Supplier roles">
                <entity-options entity-name="RoleType">
                    <entity-constraint name="parentType" vale="SUPPLIER"/>
                </entity-options>
            </group-options>
            <group-options description="Other roles">
                <list-options list-name="otherRoles"/>
            </group-options>
        </drop-down>
    </field>

At this time only the drop-down is supported, group-option can works for radio and check but not implement on ftl macro library.

…13157)

When you define a drop-down field in xml form, add new optional level with group-options to organize options.

        <field name="group">
            <drop-down>
                <group-options description="A">
                    <option key="A1" description="Ad1"/>
                    <option key="A2" description="Ad2"/>
                </group-options>
                <group-options description="B">
                    <option key="B1" description="Bd1"/>
                    <option key="B2" description="Bd2"/>
                </group-options>
            </drop-down>
        </field>

Group-options can receive all options type :

        <field name="roleTypeId">
            <drop-down>
                <group-options description="Customer roles">
                    <entity-options entity-name="RoleType">
                        <entity-constraint name="parentType" vale="CUSTOMER"/>
                    </entity-options>
                </group-options>
                <group-options description="Supplier roles">
                    <entity-options entity-name="RoleType">
                        <entity-constraint name="parentType" vale="SUPPLIER"/>
                    </entity-options>
                </group-options>
                <group-options description="Other roles">
                    <list-options list-name="otherRoles"/>
                </group-options>
            </drop-down>
        </field>

At this time only the drop-down is supported, group-option can works for radio and check but not implement on ftl macro library.
Copy link

sonarcloud bot commented Oct 23, 2024

@nmalin nmalin merged commit 24fc14a into apache:trunk Oct 23, 2024
6 checks passed
@nmalin nmalin deleted the OFBIZ-13157 branch October 23, 2024 18:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant