|
12 | 12 |
|
13 | 13 | import java.io.IOException; |
14 | 14 | import java.util.ArrayList; |
| 15 | +import java.util.function.Function; |
15 | 16 | import java.util.function.UnaryOperator; |
16 | 17 | import java.util.logging.Logger; |
17 | 18 | import javafx.beans.property.SimpleObjectProperty; |
|
24 | 25 | import org.openlowcode.client.graphic.CPageSignifPath; |
25 | 26 | import org.openlowcode.client.graphic.widget.table.CObjectGridLine; |
26 | 27 | import org.openlowcode.client.graphic.widget.table.LargeTextTableCell; |
| 28 | +import org.openlowcode.client.graphic.widget.table.ObjectDataElementKeyExtractor; |
27 | 29 | import org.openlowcode.client.graphic.widget.table.ObjectTableRow; |
| 30 | +import org.openlowcode.client.graphic.widget.tools.CChoiceFieldValue; |
28 | 31 | import org.openlowcode.client.runtime.PageActionManager; |
29 | 32 | import org.openlowcode.tools.structure.ArrayDataElt; |
30 | 33 | import org.openlowcode.tools.structure.ArrayDataEltType; |
|
93 | 96 | */ |
94 | 97 | public class CTextField |
95 | 98 | extends |
96 | | - CBusinessField<TextDataElt> { |
| 99 | + CBusinessField<TextDataElt> implements ObjectDataElementKeyExtractor<ObjectDataElt,String>{ |
97 | 100 | private static final Logger LOGGER = Logger.getLogger(CTextField.class.getName()); |
98 | 101 | private static final int MAXROWWIDTH = 250; |
99 | 102 | private String label; |
@@ -1103,4 +1106,23 @@ public void addSuggestions(CPageDataRef suggestions) { |
1103 | 1106 |
|
1104 | 1107 |
|
1105 | 1108 | } |
| 1109 | + |
| 1110 | + @Override |
| 1111 | + public Function<ObjectDataElt, String> fieldExtractor() { |
| 1112 | + return (t) -> { |
| 1113 | + SimpleDataElt field = t.lookupEltByName(CTextField.this.datafieldname); |
| 1114 | + return field.defaultTextRepresentation(); |
| 1115 | + }; |
| 1116 | + |
| 1117 | + } |
| 1118 | + |
| 1119 | + @Override |
| 1120 | + public Function<String, String> keyExtractor() { |
| 1121 | + return (t)->(t); |
| 1122 | + } |
| 1123 | + |
| 1124 | + @Override |
| 1125 | + public Function<String, String> labelExtractor() { |
| 1126 | + return (t) -> (t); |
| 1127 | + } |
1106 | 1128 | } |
0 commit comments