Skip to content

Commit 89cda5e

Browse files
author
Open Lowcode SAS
committed
Close #286
1 parent f5f08f7 commit 89cda5e

File tree

1 file changed

+16
-2
lines changed

1 file changed

+16
-2
lines changed

src/org/openlowcode/design/data/DataObjectDefinitionOtherActions.java

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@
3131
import org.openlowcode.design.generation.SourceGenerator;
3232
import org.openlowcode.design.generation.StringFormatter;
3333
import org.openlowcode.design.module.Module;
34-
import org.openlowcode.module.system.data.choice.BooleanChoiceDefinition;
3534

3635
/**
3736
* This class gathers automatically generated actions for a data object.
@@ -637,7 +636,7 @@ public static void generateAddLinesActionToFile(
637636
sg.wl("");
638637
sg.wl(" @Override");
639638
sg.wl(" public SPage choosePage(DataObjectId<" + parentclass + "> activityid_thru) {");
640-
sg.wl(" return AtgShow" + parentvariable + "Action.get().executeAndShowPage(activityid_thru);");
639+
sg.wl(" return AtgPrepareaddlinesfor" + hasmultidimensionchild.getInstancename().toLowerCase() + "Action.get().executeAndShowPage(activityid_thru);");
641640
sg.wl(" }");
642641
sg.wl("");
643642
sg.wl("}");
@@ -670,6 +669,13 @@ public static void generateAddLinesPageToFile(
670669
sg.wl("import org.openlowcode.server.graphic.widget.SObjectIdStorage;");
671670
sg.wl("import org.openlowcode.server.graphic.widget.SPageText;");
672671
sg.wl("");
672+
673+
sg.wl("import " + module.getPath() + ".action.generated.AbsRepairlinesfor"
674+
+ hasmultidimensionchild.getInstancename().toLowerCase() + "Action;");
675+
sg.wl("import " + module.getPath() + ".action.generated.AtgRepairlinesfor"
676+
+ hasmultidimensionchild.getInstancename().toLowerCase() + "Action;");
677+
678+
673679
sg.wl("import " + module.getPath() + ".action.generated.AbsAddlinesfor"
674680
+ hasmultidimensionchild.getInstancename().toLowerCase() + "Action;");
675681
sg.wl("import " + module.getPath() + ".action.generated.AbsShow" + parentvariable + "Action;");
@@ -750,9 +756,17 @@ public static void generateAddLinesPageToFile(
750756
sg.wl(" AbsShow" + parentvariable + "Action.ActionRef backtoparent = AtgShow" + parentvariable
751757
+ "Action.get().getActionRef();");
752758
sg.wl(" backtoparent.setId(" + parentvariable + "idstorage.getObjectIdInput());");
759+
760+
sg.wl("");
761+
sg.wl(" AbsRepairlinesfor"
762+
+ hasmultidimensionchild.getInstancename().toLowerCase() + "Action.ActionRef repairlinesaction = AtgRepairlinesfor"
763+
+ hasmultidimensionchild.getInstancename().toLowerCase() + "Action.get().getActionRef();");
764+
sg.wl(" repairlinesaction.set" + parentclass + "id(" + parentvariable + "idstorage.getObjectIdInput());");
753765
sg.wl("");
766+
754767
sg.wl(" buttonband.addElement(new SActionButton(\"Back\", backtoparent,this));");
755768
sg.wl(" buttonband.addElement(new SActionButton(\"Create new\",addchildrenaction,this));");
769+
sg.wl(" buttonband.addElement(new SActionButton(\"Repair lines\",repairlinesaction,this));");
756770
sg.wl(" mainband.addElement(buttonband);");
757771
sg.wl(" mainband.addElement(new SPageText(\"Existing Elements below\", SPageText.TYPE_TITLE, this));");
758772
sg.wl("");

0 commit comments

Comments
 (0)