Skip to content

Commit

Permalink
JNG-5448 create and open
Browse files Browse the repository at this point in the history
  • Loading branch information
noherczeg committed Jan 29, 2024
1 parent 20f386e commit ede5615
Show file tree
Hide file tree
Showing 7 changed files with 108 additions and 11 deletions.
16 changes: 10 additions & 6 deletions judo-ui-react-itest/ActionGroupTest/model/ActionGroupTest-ui.model
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
</pages>
<pages xmi:id="God/(esm/_MuBBIF2kEeyQjYf9d33o_w)/AccessFormPageDefinition" name="God::earth::AccessFormPage" dataElement="God/(esm/_MuBBIF2kEeyQjYf9d33o_w)/Access" container="God/(esm/_oUOCwE7rEeycO-gUAWxcVg)/TransferObjectFormPageContainer" openInDialog="true">
<actions xmi:id="God/(esm/_MuBBIF2kEeyQjYf9d33o_w)/AccessFormBackAction" name="God::earth::Back" actionDefinition="God/(esm/_oUOCwE7rEeycO-gUAWxcVg)/TransferObjectFormBackActionDefinition" ownerDataElement="God/(esm/_MuBBIF2kEeyQjYf9d33o_w)/Access"/>
<actions xmi:id="God/(esm/_MuBBIF2kEeyQjYf9d33o_w)/AccessFormCreateAction" name="God::earth::Create" actionDefinition="God/(esm/_oUOCwE7rEeycO-gUAWxcVg)/TransferObjectFormCreateActionDefinition" ownerDataElement="God/(esm/_MuBBIF2kEeyQjYf9d33o_w)/Access"/>
<actions xmi:id="God/(esm/_MuBBIF2kEeyQjYf9d33o_w)/AccessFormCreateAction" name="God::earth::Create" actionDefinition="God/(esm/_oUOCwE7rEeycO-gUAWxcVg)/TransferObjectFormCreateActionDefinition" targetPageDefinition="God/(esm/_MuBBIF2kEeyQjYf9d33o_w)/AccessViewPageDefinition" ownerDataElement="God/(esm/_MuBBIF2kEeyQjYf9d33o_w)/Access"/>
<actions xmi:id="God/(esm/_MuBBIF2kEeyQjYf9d33o_w)/AccessFormGetTemplateAction" name="God::earth::GetTemplate" actionDefinition="God/(esm/_oUOCwE7rEeycO-gUAWxcVg)/TransferObjectFormGetTemplateActionDefinition"/>
</pages>
<pages xmi:id="God/(esm/_MuBBIF2kEeyQjYf9d33o_w)/AccessViewPageDefinition" name="God::earth::AccessViewPage" dataElement="God/(esm/_MuBBIF2kEeyQjYf9d33o_w)/Access" container="God/(esm/_oUJKQE7rEeycO-gUAWxcVg)/TransferObjectViewPageContainer">
Expand Down Expand Up @@ -71,7 +71,7 @@
</pages>
<pages xmi:id="God/(esm/_MbCVkOOkEeuTFeBuQgBSDg)/AccessFormPageDefinition" name="God::galaxies::AccessFormPage" dataElement="God/(esm/_MbCVkOOkEeuTFeBuQgBSDg)/Access" container="God/(esm/_YTwP0E7rEeycO-gUAWxcVg)/TransferObjectFormPageContainer" openInDialog="true">
<actions xmi:id="God/(esm/_MbCVkOOkEeuTFeBuQgBSDg)/AccessFormBackAction" name="God::galaxies::Back" actionDefinition="God/(esm/_YTwP0E7rEeycO-gUAWxcVg)/TransferObjectFormBackActionDefinition" ownerDataElement="God/(esm/_MbCVkOOkEeuTFeBuQgBSDg)/Access"/>
<actions xmi:id="God/(esm/_MbCVkOOkEeuTFeBuQgBSDg)/AccessFormCreateAction" name="God::galaxies::Create" actionDefinition="God/(esm/_YTwP0E7rEeycO-gUAWxcVg)/TransferObjectFormCreateActionDefinition" ownerDataElement="God/(esm/_MbCVkOOkEeuTFeBuQgBSDg)/Access"/>
<actions xmi:id="God/(esm/_MbCVkOOkEeuTFeBuQgBSDg)/AccessFormCreateAction" name="God::galaxies::Create" actionDefinition="God/(esm/_YTwP0E7rEeycO-gUAWxcVg)/TransferObjectFormCreateActionDefinition" targetPageDefinition="God/(esm/_MbCVkOOkEeuTFeBuQgBSDg)/AccessViewPageDefinition" ownerDataElement="God/(esm/_MbCVkOOkEeuTFeBuQgBSDg)/Access"/>
<actions xmi:id="God/(esm/_MbCVkOOkEeuTFeBuQgBSDg)/AccessFormGetTemplateAction" name="God::galaxies::GetTemplate" actionDefinition="God/(esm/_YTwP0E7rEeycO-gUAWxcVg)/TransferObjectFormGetTemplateActionDefinition"/>
<actions xmi:id="God/(esm/_28BIQBn_Ee2lYv3NngvLeA)/TabularReferenceFieldLinkAutocompleteRangeAction/(discriminator/God/(esm/_MbCVkOOkEeuTFeBuQgBSDg)/AccessFormPageDefinition)" name="View::Galaxy::Form::astronomer::TabularReferenceFieldLinkAutocompleteRangeAction" actionDefinition="God/(esm/_28BIQBn_Ee2lYv3NngvLeA)/TabularReferenceFieldLinkAutocompleteRangeActionDefinition" targetDataElement="God/(esm/_Jr3IkBMbEe2_DOUDKkB20Q)/RelationType" ownerDataElement="God/(esm/_MbCVkOOkEeuTFeBuQgBSDg)/Access"/>
<actions xmi:id="God/(esm/_28BIQBn_Ee2lYv3NngvLeA)/TabularReferenceFieldLinkCreateAction/(discriminator/God/(esm/_MbCVkOOkEeuTFeBuQgBSDg)/AccessFormPageDefinition)" name="View::Galaxy::Form::astronomer::TabularReferenceFieldLinkCreateAction" actionDefinition="God/(esm/_28BIQBn_Ee2lYv3NngvLeA)/TabularReferenceFieldLinkCreateOpenActionDefinition" targetPageDefinition="God/(esm/_Jr3IkBMbEe2_DOUDKkB20Q)/RelationFeatureForm" targetDataElement="God/(esm/_Jr3IkBMbEe2_DOUDKkB20Q)/RelationType" ownerDataElement="God/(esm/_MbCVkOOkEeuTFeBuQgBSDg)/Access"/>
Expand Down Expand Up @@ -118,7 +118,7 @@
</pages>
<pages xmi:id="God/(esm/_C3WYQFESEey9FsAGkTPQRw)/AccessFormPageDefinition" name="God::matter::AccessFormPage" dataElement="God/(esm/_C3WYQFESEey9FsAGkTPQRw)/Access" container="God/(esm/_D0xk0Oq_EeuMzos2n42msw)/TransferObjectFormPageContainer" openInDialog="true">
<actions xmi:id="God/(esm/_C3WYQFESEey9FsAGkTPQRw)/AccessFormBackAction" name="God::matter::Back" actionDefinition="God/(esm/_D0xk0Oq_EeuMzos2n42msw)/TransferObjectFormBackActionDefinition" ownerDataElement="God/(esm/_C3WYQFESEey9FsAGkTPQRw)/Access"/>
<actions xmi:id="God/(esm/_C3WYQFESEey9FsAGkTPQRw)/AccessFormCreateAction" name="God::matter::Create" actionDefinition="God/(esm/_D0xk0Oq_EeuMzos2n42msw)/TransferObjectFormCreateActionDefinition" ownerDataElement="God/(esm/_C3WYQFESEey9FsAGkTPQRw)/Access"/>
<actions xmi:id="God/(esm/_C3WYQFESEey9FsAGkTPQRw)/AccessFormCreateAction" name="God::matter::Create" actionDefinition="God/(esm/_D0xk0Oq_EeuMzos2n42msw)/TransferObjectFormCreateActionDefinition" targetPageDefinition="God/(esm/_C3WYQFESEey9FsAGkTPQRw)/AccessViewPageDefinition" ownerDataElement="God/(esm/_C3WYQFESEey9FsAGkTPQRw)/Access"/>
<actions xmi:id="God/(esm/_C3WYQFESEey9FsAGkTPQRw)/AccessFormGetTemplateAction" name="God::matter::GetTemplate" actionDefinition="God/(esm/_D0xk0Oq_EeuMzos2n42msw)/TransferObjectFormGetTemplateActionDefinition"/>
</pages>
<pages xmi:id="God/(esm/_C3WYQFESEey9FsAGkTPQRw)/AccessTablePageDefinition" name="God::matter::AccessTablePage" dataElement="God/(esm/_C3WYQFESEey9FsAGkTPQRw)/Access" container="God/(esm/_D04SgOq_EeuMzos2n42msw)/TransferObjectTablePageContainer">
Expand Down Expand Up @@ -213,7 +213,7 @@
</pages>
<pages xmi:id="God/(esm/_Jr3IkBMbEe2_DOUDKkB20Q)/RelationFeatureForm" name="View::Galaxy::astronomer::RelationFormPage" dataElement="God/(esm/_Jr3IkBMbEe2_DOUDKkB20Q)/RelationType" container="God/(esm/_3uEGQBMaEe2_DOUDKkB20Q)/TransferObjectFormPageContainer" openInDialog="true">
<actions xmi:id="God/(esm/_Jr3IkBMbEe2_DOUDKkB20Q)/RelationFeatureFormBackAction" name="View::Galaxy::astronomer::Back" actionDefinition="God/(esm/_3uEGQBMaEe2_DOUDKkB20Q)/TransferObjectFormBackActionDefinition" ownerDataElement="God/(esm/_Jr3IkBMbEe2_DOUDKkB20Q)/RelationType"/>
<actions xmi:id="God/(esm/_Jr3IkBMbEe2_DOUDKkB20Q)/RelationFeatureFormCreateAction" name="View::Galaxy::astronomer::Create" actionDefinition="God/(esm/_3uEGQBMaEe2_DOUDKkB20Q)/TransferObjectFormCreateActionDefinition" ownerDataElement="God/(esm/_Jr3IkBMbEe2_DOUDKkB20Q)/RelationType"/>
<actions xmi:id="God/(esm/_Jr3IkBMbEe2_DOUDKkB20Q)/RelationFeatureFormCreateAction" name="View::Galaxy::astronomer::Create" actionDefinition="God/(esm/_3uEGQBMaEe2_DOUDKkB20Q)/TransferObjectFormCreateActionDefinition" targetPageDefinition="God/(esm/_Jr3IkBMbEe2_DOUDKkB20Q)/RelationFeatureView" ownerDataElement="God/(esm/_Jr3IkBMbEe2_DOUDKkB20Q)/RelationType"/>
<actions xmi:id="God/(esm/_Jr3IkBMbEe2_DOUDKkB20Q)/RelationFeatureFormGetTemplateAction" name="View::Galaxy::astronomer::GetTemplate" actionDefinition="God/(esm/_3uEGQBMaEe2_DOUDKkB20Q)/TransferObjectFormGetTemplateActionDefinition"/>
</pages>
<pages xmi:id="God/(esm/_Jr3IkBMbEe2_DOUDKkB20Q)/RelationFeatureView" name="View::Galaxy::astronomer::RelationViewPage" dataElement="God/(esm/_Jr3IkBMbEe2_DOUDKkB20Q)/RelationType" container="God/(esm/_3t-msBMaEe2_DOUDKkB20Q)/TransferObjectViewPageContainer">
Expand Down Expand Up @@ -245,7 +245,7 @@
</pages>
<pages xmi:id="God/(esm/_B7jpUE7sEeycO-gUAWxcVg)/RelationFeatureForm" name="View::Galaxy::stars::RelationFormPage" dataElement="God/(esm/_B7jpUE7sEeycO-gUAWxcVg)/RelationType" container="God/(esm/_ePX5sE7rEeycO-gUAWxcVg)/TransferObjectFormPageContainer" openInDialog="true">
<actions xmi:id="God/(esm/_B7jpUE7sEeycO-gUAWxcVg)/RelationFeatureFormBackAction" name="View::Galaxy::stars::Back" actionDefinition="God/(esm/_ePX5sE7rEeycO-gUAWxcVg)/TransferObjectFormBackActionDefinition" ownerDataElement="God/(esm/_B7jpUE7sEeycO-gUAWxcVg)/RelationType"/>
<actions xmi:id="God/(esm/_B7jpUE7sEeycO-gUAWxcVg)/RelationFeatureFormCreateAction" name="View::Galaxy::stars::Create" actionDefinition="God/(esm/_ePX5sE7rEeycO-gUAWxcVg)/TransferObjectFormCreateActionDefinition" ownerDataElement="God/(esm/_B7jpUE7sEeycO-gUAWxcVg)/RelationType"/>
<actions xmi:id="God/(esm/_B7jpUE7sEeycO-gUAWxcVg)/RelationFeatureFormCreateAction" name="View::Galaxy::stars::Create" actionDefinition="God/(esm/_ePX5sE7rEeycO-gUAWxcVg)/TransferObjectFormCreateActionDefinition" targetPageDefinition="God/(esm/_B7jpUE7sEeycO-gUAWxcVg)/RelationFeatureView" ownerDataElement="God/(esm/_B7jpUE7sEeycO-gUAWxcVg)/RelationType"/>
<actions xmi:id="God/(esm/_B7jpUE7sEeycO-gUAWxcVg)/RelationFeatureFormGetTemplateAction" name="View::Galaxy::stars::GetTemplate" actionDefinition="God/(esm/_ePX5sE7rEeycO-gUAWxcVg)/TransferObjectFormGetTemplateActionDefinition"/>
</pages>
<pages xmi:id="God/(esm/_B7jpUE7sEeycO-gUAWxcVg)/RelationFeatureView" name="View::Galaxy::stars::RelationViewPage" dataElement="God/(esm/_B7jpUE7sEeycO-gUAWxcVg)/RelationType" container="God/(esm/_ePRzEE7rEeycO-gUAWxcVg)/TransferObjectViewPageContainer" openInDialog="true">
Expand Down Expand Up @@ -347,7 +347,7 @@
</pages>
<pages xmi:id="God/(esm/_Hfxf0E7sEeycO-gUAWxcVg)/RelationFeatureForm" name="View::Star::planets::RelationFormPage" dataElement="God/(esm/_Hfxf0E7sEeycO-gUAWxcVg)/RelationType" container="God/(esm/_oUOCwE7rEeycO-gUAWxcVg)/TransferObjectFormPageContainer" openInDialog="true">
<actions xmi:id="God/(esm/_Hfxf0E7sEeycO-gUAWxcVg)/RelationFeatureFormBackAction" name="View::Star::planets::Back" actionDefinition="God/(esm/_oUOCwE7rEeycO-gUAWxcVg)/TransferObjectFormBackActionDefinition" ownerDataElement="God/(esm/_Hfxf0E7sEeycO-gUAWxcVg)/RelationType"/>
<actions xmi:id="God/(esm/_Hfxf0E7sEeycO-gUAWxcVg)/RelationFeatureFormCreateAction" name="View::Star::planets::Create" actionDefinition="God/(esm/_oUOCwE7rEeycO-gUAWxcVg)/TransferObjectFormCreateActionDefinition" ownerDataElement="God/(esm/_Hfxf0E7sEeycO-gUAWxcVg)/RelationType"/>
<actions xmi:id="God/(esm/_Hfxf0E7sEeycO-gUAWxcVg)/RelationFeatureFormCreateAction" name="View::Star::planets::Create" actionDefinition="God/(esm/_oUOCwE7rEeycO-gUAWxcVg)/TransferObjectFormCreateActionDefinition" targetPageDefinition="God/(esm/_Hfxf0E7sEeycO-gUAWxcVg)/RelationFeatureView" ownerDataElement="God/(esm/_Hfxf0E7sEeycO-gUAWxcVg)/RelationType"/>
<actions xmi:id="God/(esm/_Hfxf0E7sEeycO-gUAWxcVg)/RelationFeatureFormGetTemplateAction" name="View::Star::planets::GetTemplate" actionDefinition="God/(esm/_oUOCwE7rEeycO-gUAWxcVg)/TransferObjectFormGetTemplateActionDefinition"/>
</pages>
<pages xmi:id="God/(esm/_Hfxf0E7sEeycO-gUAWxcVg)/RelationFeatureView" name="View::Star::planets::RelationViewPage" dataElement="God/(esm/_Hfxf0E7sEeycO-gUAWxcVg)/RelationType" container="God/(esm/_oUJKQE7rEeycO-gUAWxcVg)/TransferObjectViewPageContainer">
Expand Down Expand Up @@ -424,6 +424,7 @@
<behaviours>CREATE</behaviours>
<behaviours>VALIDATE_CREATE</behaviours>
<behaviours>REFRESH</behaviours>
<behaviours>EXPORT</behaviours>
<behaviours>UPDATE</behaviours>
<behaviours>VALIDATE_UPDATE</behaviours>
<behaviours>DELETE</behaviours>
Expand Down Expand Up @@ -553,6 +554,7 @@
<behaviours>CREATE</behaviours>
<behaviours>VALIDATE_CREATE</behaviours>
<behaviours>REFRESH</behaviours>
<behaviours>EXPORT</behaviours>
<behaviours>UPDATE</behaviours>
<behaviours>VALIDATE_UPDATE</behaviours>
<behaviours>DELETE</behaviours>
Expand Down Expand Up @@ -2007,6 +2009,7 @@
<buttons xmi:id="God/(esm/_WOqaAB1cEe2lYv3NngvLeA)/OperationFormTableRowCallOperationButton/(discriminator/God/(esm/_oUSUME7rEeycO-gUAWxcVg)/TransferObjectTable)" name="chooseTheMessiah" label="chooseTheMessiah" fit="LOOSE" enabledBy="God/(esm/_oUhkwE7rEeycO-gUAWxcVg)/AttributeType" dataElement="God/(esm/_sFIpYBMcEe2_DOUDKkB20Q)/OperationType" buttonStyle="contained">
<icon xmi:id="God/(esm/_WOqaAB1cEe2lYv3NngvLeA)/OperationFormTableRowCallOperationButtonIcon/(discriminator/God/(esm/_oUSUME7rEeycO-gUAWxcVg)/TransferObjectTable)" name="chooseTheMessiah::Icon" iconName="account"/>
<actionDefinition xsi:type="ui:CallOperationActionDefinition" xmi:id="God/(esm/_WOqaAB1cEe2lYv3NngvLeA)/OperationFormTableRowCallActionDefinition/(discriminator/God/(esm/_oUSUME7rEeycO-gUAWxcVg)/TransferObjectTable)" name="View::Planet::View::group::actionGroup::chooseTheMessiah" targetType="God/(esm/_oUAnYE7rEeycO-gUAWxcVg)/ClassType" operation="God/(esm/_sFIpYBMcEe2_DOUDKkB20Q)/OperationType"/>
<confirmation xmi:id="God/(esm/_WOqaAB1cEe2lYv3NngvLeA)/OperationFormConfirmation/(discriminator/God/(esm/_oUSUME7rEeycO-gUAWxcVg)/TransferObjectTable)" confirmationType="MANDATORY" confirmationMessage="Are you sure?"/>
</buttons>
<buttons xmi:id="God/(esm/_a1lo8FDkEeyjf_w6-3_EHA)/OperationFormTableRowCallOperationButton/(discriminator/God/(esm/_oUSUME7rEeycO-gUAWxcVg)/TransferObjectTable)" name="createCreature" label="createCreature" fit="LOOSE" enabledBy="God/(esm/_oUmdQE7rEeycO-gUAWxcVg)/AttributeType" dataElement="God/(esm/_VK7BME7sEeycO-gUAWxcVg)/OperationType" buttonStyle="contained">
<icon xmi:id="God/(esm/_a1lo8FDkEeyjf_w6-3_EHA)/OperationFormTableRowCallOperationButtonIcon/(discriminator/God/(esm/_oUSUME7rEeycO-gUAWxcVg)/TransferObjectTable)" name="createCreature::Icon" iconName="unicorn-variant"/>
Expand Down Expand Up @@ -2714,6 +2717,7 @@
<buttons xmi:id="God/(esm/_WOqaAB1cEe2lYv3NngvLeA)/OperationFormTableRowCallOperationButton/(discriminator/God/(esm/_GuuWAE7vEeycO-gUAWxcVg)/TabularReferenceTableRowButtonGroup)" name="chooseTheMessiah" label="chooseTheMessiah" fit="LOOSE" enabledBy="God/(esm/_oUhkwE7rEeycO-gUAWxcVg)/AttributeType" dataElement="God/(esm/_sFIpYBMcEe2_DOUDKkB20Q)/OperationType" buttonStyle="contained">
<icon xmi:id="God/(esm/_WOqaAB1cEe2lYv3NngvLeA)/OperationFormTableRowCallOperationButtonIcon/(discriminator/God/(esm/_GuuWAE7vEeycO-gUAWxcVg)/TabularReferenceTableRowButtonGroup)" name="chooseTheMessiah::Icon" iconName="account"/>
<actionDefinition xsi:type="ui:CallOperationActionDefinition" xmi:id="God/(esm/_WOqaAB1cEe2lYv3NngvLeA)/OperationFormTableRowCallActionDefinition/(discriminator/God/(esm/_GuuWAE7vEeycO-gUAWxcVg)/TabularReferenceField)" name="View::Planet::View::group::actionGroup::chooseTheMessiah" targetType="God/(esm/_oUAnYE7rEeycO-gUAWxcVg)/ClassType" operation="God/(esm/_sFIpYBMcEe2_DOUDKkB20Q)/OperationType"/>
<confirmation xmi:id="God/(esm/_WOqaAB1cEe2lYv3NngvLeA)/OperationFormConfirmation/(discriminator/God/(esm/_GuuWAE7vEeycO-gUAWxcVg)/TabularReferenceTableRowButtonGroup)" confirmationType="MANDATORY" confirmationMessage="Are you sure?"/>
</buttons>
<buttons xmi:id="God/(esm/_a1lo8FDkEeyjf_w6-3_EHA)/OperationFormTableRowCallOperationButton/(discriminator/God/(esm/_GuuWAE7vEeycO-gUAWxcVg)/TabularReferenceTableRowButtonGroup)" name="createCreature" label="createCreature" fit="LOOSE" enabledBy="God/(esm/_oUmdQE7rEeycO-gUAWxcVg)/AttributeType" dataElement="God/(esm/_VK7BME7sEeycO-gUAWxcVg)/OperationType" buttonStyle="contained">
<icon xmi:id="God/(esm/_a1lo8FDkEeyjf_w6-3_EHA)/OperationFormTableRowCallOperationButtonIcon/(discriminator/God/(esm/_GuuWAE7vEeycO-gUAWxcVg)/TabularReferenceTableRowButtonGroup)" name="createCreature::Icon" iconName="unicorn-variant"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,8 @@ public static String getContainerOwnActionParameters(ActionDefinition actionDefi
// queryCustomizer: {{ classDataName container.dataElement 'QueryCustomizer' }}
if (actionDefinition.getIsRefreshAction()) {
res += "queryCustomizer: " + classDataName((ClassType) container.getDataElement(), "QueryCustomizer");
} else if (actionDefinition.getIsCreateAction()) {
res += "openCreated?: boolean";
} else if (actionDefinition.getTargetType() != null) {
String targetName = classDataName(actionDefinition.getTargetType(), "Stored");
if (container.isIsRelationSelector()) {
Expand Down Expand Up @@ -345,6 +347,7 @@ public static String postCreateActionParams(PageDefinition page, ActionDefinitio
tokens.add("res: " + type);
tokens.add("onSubmit: (result?: " + type + ") => Promise<void>");
tokens.add("onClose: () => Promise<void>");
tokens.add("openCreated?: boolean");
return String.join(", ", tokens);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -271,4 +271,19 @@ public static List<Input> getInputsForContainer(PageContainer container) {
public static List<Link> getLinksForContainer(PageContainer container) {
return container.getLinks().stream().map(e -> ((Link) e)).sorted(Comparator.comparing(NamedElement::getFQName)).collect(Collectors.toList());
}

public static boolean containerHasCreateAction(PageContainer container) {
return container.getActionButtonGroup() != null && container.getActionButtonGroup().getButtons().stream()
.anyMatch(b -> b.getActionDefinition() instanceof CreateActionDefinition);
}

public static ActionDefinition getCreateActionDefinitionForCreateContainer(PageContainer container) {
if (container.getActionButtonGroup() != null) {
container.getActionButtonGroup().getButtons().stream()
.map(Button::getActionDefinition)
.filter(actionDefinition -> actionDefinition instanceof CreateActionDefinition)
.findFirst().orElse(null);
}
return null;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,16 @@ && getActionOperationOutputClassType(a).isIsMapped()
for (Action action: actionsForMappedNavigation) {
res.add(action.getTargetPageDefinition());
}
List<Action> actionsForCreateAndNavigate = pageDefinition.getActions()
.stream()
.filter(a -> a.getIsCreateAction()
&& a.getTargetPageDefinition() != null
&& !a.getTargetPageDefinition().isOpenInDialog()
)
.toList();
for (Action action: actionsForCreateAndNavigate) {
res.add(action.getTargetPageDefinition());
}
} catch (Exception e) {
throw new RuntimeException(e);
}
Expand Down
Loading

0 comments on commit ede5615

Please sign in to comment.