[BLOSSOM-296] DOC: Mgnl 6.2.18 - Support for UI 6 definitions in Blossom's @DialogFactories and @TabFactories Created: 12/Apr/22  Updated: 05/Jul/22  Resolved: 21/Apr/22

Status: Closed
Project: Blossom
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Task Priority: Neutral
Reporter: Martin Drápela Assignee: Martin Drápela
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Problem/Incident
causes BLOSSOM-297 DEV-DOC: Provide UI 6 definition exam... Open
documentation
documents BLOSSOM-290 Enable UI 6 definition usage in dialo... Closed
Template:
Acceptance criteria:
Empty
Task DoR:
Empty
Epic Link: DevX Bucket
Sprint: DevX 8
Story Points: 2
Team: DeveloperX

 Description   

Update the 6.2 Blossom-module.adoc page.

Support for UI 6 definitions in Blossom's @DialogFactories and @TabFactories. \o/

The new usage is a little bit different (no fluent builders), but still quite concise.

The key difference is that @TabFactories may now return a List<EditorPropertyDefinition>—simply add your FieldDefinitions to it—instead of injecting the former TabBuilder. Blossom then generates a form-dialog definition, with a tabbed layout. See the sample below:

@TabFactory("Content")
public List<EditorPropertyDefinition> contentTab() {
    TextFieldDefinition heading = new TextFieldDefinition();
    heading.setName("heading");
    RichTextFieldDefinition body = new RichTextFieldDefinition();
    body.setName("body");
    body.setRequired(true);

    return List.of(heading, body);
}

The update preserves support for multiple tab-factories, @TabOrder, post-processing via @PostCreate (see this other sample), and @DialogFactory methods.

 


Generated at Sun Feb 11 23:32:04 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.