コミュニティアチーブメントバーを展開する。

Submissions are now open for the 2026 Adobe Experience Maker Awards.

Mark Solution

この会話は、活動がないためロックされています。新しい投稿を作成してください。

解決済み

Order of Items at Sling context site configuration

Avatar

Level 2

Hi Team,

 

We are using Sling context aware config. But we want to arrange order. 

for eg:

@Property(label = "Enter the button Label", description = "Button Label")
String buttonLabel();
@Property(label = "Enter the title1, description = "Enter the title1")
String title2();
@Property(label = "Enter the title, description = "Enter the title")
String title();
@Property(label = "Enter the title1, description = "Enter the title1")
String title1();

 

When we deploy squence is random. How to show title as first attribute then title1, title2, buttonlabel?

TIA

Naina

1 受け入れられたソリューション

Avatar

正解者
Community Advisor and Adobe Champion

You can use "order=n" to @property. Below is the example:

@Property(label = "Enter the title, description = "Enter the title", order = 1)
String title();
@Property(label = "Enter the title1, description = "Enter the title1",order = 2)
String title1();
@Property(label = "Enter the title1, description = "Enter the title1",order = 3)
String title2();
@Property(label = "Enter the button Label", description = "Button Label",order = 4)
String buttonLabel();

 Refer https://sunsushil.wordpress.com/2021/05/12/context-aware-configuration-in-aem/ for more details.

元の投稿で解決策を見る

3 返信

Avatar

正解者
Community Advisor and Adobe Champion

You can use "order=n" to @property. Below is the example:

@Property(label = "Enter the title, description = "Enter the title", order = 1)
String title();
@Property(label = "Enter the title1, description = "Enter the title1",order = 2)
String title1();
@Property(label = "Enter the title1, description = "Enter the title1",order = 3)
String title2();
@Property(label = "Enter the button Label", description = "Button Label",order = 4)
String buttonLabel();

 Refer https://sunsushil.wordpress.com/2021/05/12/context-aware-configuration-in-aem/ for more details.

Avatar

Level 2

Its working.

Thanks

Avatar

Community Advisor

Hi @naina01 ,

 

you can use the "order" attribute at the annotation level where it will define the 

Number to control property order in the configuration editor. The default value will be 0.

ex:

@Property(label = "Enter the button Label", description = "Button Label", order=3)
String buttonLabel();
@Property(label = "Enter the title1, description = "Enter the title1", order=2)
String title2();
@Property(label = "Enter the title, description = "Enter the title")
String title();
@Property(label = "Enter the title1, description = "Enter the title1", order=1)
String title1();