@@ -196,6 +196,7 @@ public class NewEntityDialog extends AbstractDialog {
196
196
private static final String GRID_NAME = "Grit Name" ;
197
197
private static final String IDENTIFIER = "Identifier" ;
198
198
private static final String SORT_ORDER = "Sort Order" ;
199
+ private static final String UI_COMPONENTS_TAB_NAME = "Admin UI Components" ;
199
200
200
201
@ FieldValidation (rule = RuleRegistry .NOT_EMPTY , message = {NotEmptyRule .MESSAGE , FORM_NAME })
201
202
@ FieldValidation (rule = RuleRegistry .IDENTIFIER , message = {IdentifierRule .MESSAGE })
@@ -221,6 +222,7 @@ public class NewEntityDialog extends AbstractDialog {
221
222
private JTextPane exampleAclId ;
222
223
private JTextPane exampleFormName ;
223
224
private JTextPane exampleGridName ;
225
+ private JPanel uiComponentsPanel ;
224
226
private JTextField observerName ;
225
227
226
228
/**
@@ -269,6 +271,10 @@ protected void textChanged(final @NotNull DocumentEvent event) {
269
271
autoCompleteIdentifiers ();
270
272
}
271
273
});
274
+
275
+ toggleUiComponentsPanel ();
276
+
277
+ createUiComponent .addItemListener (event -> toggleUiComponentsPanel ());
272
278
}
273
279
274
280
/**
@@ -1399,4 +1405,16 @@ private void autoCompleteIdentifiers() {
1399
1405
menuIdentifier .setText (getModuleName ().concat ("::management" ));
1400
1406
menuTitle .setText (entityNameLabel .concat (" Management" ));
1401
1407
}
1408
+
1409
+ /**
1410
+ * Resolve ui components panel state.
1411
+ */
1412
+ private void toggleUiComponentsPanel () {
1413
+ if (createUiComponent .isSelected ()) {
1414
+ tabbedPane1 .add (uiComponentsPanel , 1 );
1415
+ tabbedPane1 .setTitleAt (1 , UI_COMPONENTS_TAB_NAME );
1416
+ } else {
1417
+ tabbedPane1 .remove (1 );
1418
+ }
1419
+ }
1402
1420
}
0 commit comments