-
Notifications
You must be signed in to change notification settings - Fork 530
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implemented: Add group option on drow-down in xml screen form (OFBIZ-…
…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.
- Loading branch information
Showing
5 changed files
with
293 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 30 additions & 0 deletions
30
framework/widget/src/main/java/org/apache/ofbiz/widget/renderer/macro/model/GroupOption.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
/* | ||
* Licensed to the Apache Software Foundation (ASF) under one | ||
* or more contributor license agreements. See the NOTICE file | ||
* distributed with this work for additional information | ||
* regarding copyright ownership. The ASF licenses this file | ||
* to you under the Apache License, Version 2.0 (the | ||
* "License"); you may not use this file except in compliance | ||
* with the License. You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, | ||
* software distributed under the License is distributed on an | ||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
* KIND, either express or implied. See the License for the | ||
* specific language governing permissions and limitations | ||
* under the License. | ||
*/ | ||
package org.apache.ofbiz.widget.renderer.macro.model; | ||
|
||
import java.util.List; | ||
|
||
/** | ||
* Record representing a group option in a drop-down (select) list. | ||
*/ | ||
public record GroupOption(String id, | ||
String description, | ||
String widgetStyle, | ||
List<Object> options) { | ||
} |
Oops, something went wrong.