There are 5 updates, 2 comments.
 
 
XWiki Commons / cid:jira-generated-image-avatar-5713f56d-7d79-4bc9-a2af-8402a66173c1 XCOMMONS-3225 Closed

Provide a way to define mandatory group of properties

 
View issue   ·   Add comment
 

5 updates

 
cid:jira-generated-image-avatar-77739468-43d8-4d99-a556-f515fd70e981 Changes by Charpentier Lucas on 11/Mar/25 11:12
 
Documentation in Release Notes: N/A
Documentation: N/A
Assignee: Charpentier Lucas
Resolution: Duplicate
Status: Open Closed
 
 

2 comments

 
cid:jira-generated-image-avatar-77739468-43d8-4d99-a556-f515fd70e981 Charpentier Lucas on 11/Mar/25 11:11
 

AFAIU, the `PropertyGroup` annotation is here mostly to guide presentation and the `PropertyFeature` is more meaningful semantically.

Two barely related properties can completely be in the same group.

See an example of both annotations used at https://github.com/xwiki/xwiki-platform/blob/fb8e06afa1a7e46e33ce311eb4b09be81b0567f6/xwiki-platform-core/xwiki-platform-display/xwiki-platform-display-macro/src/main/java/org/xwiki/rendering/macro/display/DisplayMacroParameters.java#L66-L67

Group: reference + type of the reference – their content fills up different purposes, the purposes work well together so we decide to group them in the UI.
Feature: reference + page – their content have the same purpose (setting both would be overkill and we'd have to answer the question - which one to pick? ), they are not always next to each other.

IMO it makes more sense to make a feature mandatory rather than a group. From what I understand from the issue description, this would be very repetitive with the feature proposed in XCOMMONS-2738 .

Sources: Javadoc + https://extensions.xwiki.org/xwiki/bin/view/Extension/Properties%20Module#HPopulateaJavaBean

 
cid:jira-generated-image-avatar-77739468-43d8-4d99-a556-f515fd70e981 Charpentier Lucas on 11/Mar/25 11:12
 

Closing the issue as a duplicate of XCOMMONS-2738. If I mistook the intention here (e.g. a mandatory group is one where every single property is mandatory), please reopen it smile.png