|
31 | 31 | import org.openlowcode.design.generation.SourceGenerator; |
32 | 32 | import org.openlowcode.design.generation.StringFormatter; |
33 | 33 | import org.openlowcode.design.module.Module; |
34 | | -import org.openlowcode.module.system.data.choice.BooleanChoiceDefinition; |
35 | 34 |
|
36 | 35 | /** |
37 | 36 | * This class gathers automatically generated actions for a data object. |
@@ -637,7 +636,7 @@ public static void generateAddLinesActionToFile( |
637 | 636 | sg.wl(""); |
638 | 637 | sg.wl(" @Override"); |
639 | 638 | 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);"); |
641 | 640 | sg.wl(" }"); |
642 | 641 | sg.wl(""); |
643 | 642 | sg.wl("}"); |
@@ -670,6 +669,13 @@ public static void generateAddLinesPageToFile( |
670 | 669 | sg.wl("import org.openlowcode.server.graphic.widget.SObjectIdStorage;"); |
671 | 670 | sg.wl("import org.openlowcode.server.graphic.widget.SPageText;"); |
672 | 671 | 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 | + |
673 | 679 | sg.wl("import " + module.getPath() + ".action.generated.AbsAddlinesfor" |
674 | 680 | + hasmultidimensionchild.getInstancename().toLowerCase() + "Action;"); |
675 | 681 | sg.wl("import " + module.getPath() + ".action.generated.AbsShow" + parentvariable + "Action;"); |
@@ -750,9 +756,17 @@ public static void generateAddLinesPageToFile( |
750 | 756 | sg.wl(" AbsShow" + parentvariable + "Action.ActionRef backtoparent = AtgShow" + parentvariable |
751 | 757 | + "Action.get().getActionRef();"); |
752 | 758 | 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());"); |
753 | 765 | sg.wl(""); |
| 766 | + |
754 | 767 | sg.wl(" buttonband.addElement(new SActionButton(\"Back\", backtoparent,this));"); |
755 | 768 | sg.wl(" buttonband.addElement(new SActionButton(\"Create new\",addchildrenaction,this));"); |
| 769 | + sg.wl(" buttonband.addElement(new SActionButton(\"Repair lines\",repairlinesaction,this));"); |
756 | 770 | sg.wl(" mainband.addElement(buttonband);"); |
757 | 771 | sg.wl(" mainband.addElement(new SPageText(\"Existing Elements below\", SPageText.TYPE_TITLE, this));"); |
758 | 772 | sg.wl(""); |
|
0 commit comments