Skip to content

Commit e45d1ed

Browse files
author
Open Lowcode SAS
committed
Simple adaptations
get ChoiceCategory from choice value Manage inconsistencies for actions for objects that are stored but not unique identified.
1 parent c83f3c8 commit e45d1ed

File tree

4 files changed

+22
-3
lines changed

4 files changed

+22
-3
lines changed

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

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,28 @@
2222
public class ChoiceValue
2323
extends
2424
Named {
25+
private ChoiceCategory parent;
2526
private String displayname;
2627
private String tooltip;
2728
private Integer pseudonumber;
2829

30+
/**
31+
* This method is called when adding the value for a choice category
32+
*
33+
* @param parent parent choice category.
34+
*/
35+
protected void setParent(ChoiceCategory parent) {
36+
this.parent = parent;
37+
}
38+
39+
/**
40+
*
41+
* @return the parent choice category
42+
*/
43+
public ChoiceCategory getParent() {
44+
return this.parent;
45+
}
46+
2947
/**
3048
* create a choice value without classification as pseudo-number
3149
*

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -678,7 +678,7 @@ public boolean showSearchInMenu() {
678678
if (this.forcehideobject)
679679
return false;
680680
// do not show search in menu if object is not stored
681-
if (!this.isStoredobject())
681+
if (!this.isUniqueIdentified())
682682
return false;
683683
for (int i = 0; i < this.propertylist.getSize(); i++) {
684684
Property<?> thisproperty = this.getPropertyAt(i);
@@ -1958,7 +1958,7 @@ public void generateAutomaticPagesAndActions(Module module) {
19581958
}
19591959

19601960
}
1961-
if (this.isStoredobject())
1961+
if (this.isUniqueIdentified())
19621962
if (((linkobject == null) && (autolinkobject == null)) || (this.isShowActionAutomaticallyGenerated())) {
19631963
module.addAction(this.generatePrepareStandardCreateAction());
19641964
module.addAction(this.generateStandardCreateAction());

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@ public void addValue(ChoiceValue value) {
8787
}
8888
}
8989
values.add(value);
90+
value.setParent(this);
9091
}
9192

9293
@Override

src/org/openlowcode/design/module/Module.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1811,7 +1811,7 @@ relevantlinkedtoparent, new SourceGenerator(new File(fullfilepathdeleteandshowob
18111811
}
18121812
}
18131813

1814-
if (currentobject.isStoredobject())
1814+
if (currentobject.isUniqueIdentified())
18151815
if (((linkproperty == null) && (autolinkproperty == null))
18161816
|| (currentobject.isShowActionAutomaticallyGenerated())) {
18171817
String fullfilepathpreparestandardcreateaction = srcautoactionfolder + "Atg"

0 commit comments

Comments
 (0)