Tony CHEMIT pushed to branch develop at ultreiaio / ird-observe
Commits:
-
4aac1786
by Tony Chemit at 2021-01-06T17:14:52+01:00
7 changed files:
- client/datasource/editor/api/src/main/java/fr/ird/observe/client/datasource/editor/api/content/ContentUIModel.java
- client/datasource/editor/api/src/main/java/fr/ird/observe/client/datasource/editor/api/content/ContentUIModelStates.java
- client/datasource/editor/api/src/main/java/fr/ird/observe/client/datasource/editor/api/content/actions/id/ShowTechnicalInformations.java
- client/datasource/editor/api/src/main/java/fr/ird/observe/client/datasource/editor/api/content/data/table/ContentTableUI.jaxx
- client/datasource/editor/api/src/main/java/fr/ird/observe/client/datasource/editor/api/content/data/table/ContentTableUI.jcss
- client/datasource/editor/api/src/main/java/fr/ird/observe/client/datasource/editor/api/content/data/table/ContentTableUIHandler.java
- client/datasource/editor/api/src/main/java/fr/ird/observe/client/datasource/editor/api/content/data/table/ContentTableUIModel.java
Changes:
| ... | ... | @@ -107,10 +107,6 @@ public abstract class ContentUIModel extends AbstractJavaBean implements Closeab |
| 107 | 107 |
states.setFormFocusOwner(formFocusOwner);
|
| 108 | 108 |
}
|
| 109 | 109 |
|
| 110 |
- public void setCanShowTechnicalInformation(boolean canShowTechnicalInformation) {
|
|
| 111 |
- states.setCanShowTechnicalInformation(canShowTechnicalInformation);
|
|
| 112 |
- }
|
|
| 113 |
- |
|
| 114 | 110 |
public String getPrefix() {
|
| 115 | 111 |
return getSource().getInitializer().getLogPrefix();
|
| 116 | 112 |
}
|
| ... | ... | @@ -54,7 +54,6 @@ public class ContentUIModelStates extends AbstractJavaBean implements Closeable |
| 54 | 54 |
public static final String PROPERTY_UPDATING_MODE = "updatingMode";
|
| 55 | 55 |
public static final String PROPERTY_OPENED = "opened";
|
| 56 | 56 |
private static final String PROPERTY_ENABLED = "enabled";
|
| 57 |
- private static final String PROPERTY_CAN_SHOW_TECHNICAL_INFORMATION = "canShowTechnicalInformation";
|
|
| 58 | 57 |
/**
|
| 59 | 58 |
* Mode of the content.
|
| 60 | 59 |
*/
|
| ... | ... | @@ -87,10 +86,6 @@ public class ContentUIModelStates extends AbstractJavaBean implements Closeable |
| 87 | 86 |
* Is content opened?
|
| 88 | 87 |
*/
|
| 89 | 88 |
private boolean opened;
|
| 90 |
- /**
|
|
| 91 |
- * Is can show technical information?
|
|
| 92 |
- */
|
|
| 93 |
- private boolean canShowTechnicalInformation;
|
|
| 94 | 89 |
/**
|
| 95 | 90 |
* Is a reset edit in progress?
|
| 96 | 91 |
*/
|
| ... | ... | @@ -288,16 +283,6 @@ public class ContentUIModelStates extends AbstractJavaBean implements Closeable |
| 288 | 283 |
firePropertyChange(PROPERTY_FORM_FOCUS_OWNER, formFocusOwner);
|
| 289 | 284 |
}
|
| 290 | 285 |
|
| 291 |
- public boolean isCanShowTechnicalInformation() {
|
|
| 292 |
- return canShowTechnicalInformation;
|
|
| 293 |
- }
|
|
| 294 |
- |
|
| 295 |
- public void setCanShowTechnicalInformation(boolean canShowTechnicalInformation) {
|
|
| 296 |
- boolean oldValue = isCanShowTechnicalInformation();
|
|
| 297 |
- this.canShowTechnicalInformation = canShowTechnicalInformation;
|
|
| 298 |
- firePropertyChange(PROPERTY_CAN_SHOW_TECHNICAL_INFORMATION, oldValue, canShowTechnicalInformation);
|
|
| 299 |
- }
|
|
| 300 |
- |
|
| 301 | 286 |
@Override
|
| 302 | 287 |
public void close() {
|
| 303 | 288 |
setOpened(false);
|
| ... | ... | @@ -32,6 +32,9 @@ import fr.ird.observe.client.datasource.editor.api.content.data.list.ContentList |
| 32 | 32 |
import fr.ird.observe.client.datasource.editor.api.content.data.list.ContentListUIModelStates;
|
| 33 | 33 |
import fr.ird.observe.client.datasource.editor.api.content.data.open.ContentOpenableUI;
|
| 34 | 34 |
import fr.ird.observe.client.datasource.editor.api.content.data.open.ContentOpenableUIModelStates;
|
| 35 |
+import fr.ird.observe.client.datasource.editor.api.content.data.table.ContentTableUI;
|
|
| 36 |
+import fr.ird.observe.client.datasource.editor.api.content.data.table.ContentTableUIModelStates;
|
|
| 37 |
+import fr.ird.observe.client.datasource.editor.api.content.data.table.ContentTableUITableModel;
|
|
| 35 | 38 |
import fr.ird.observe.client.datasource.editor.api.content.referential.ContentReferentialUI;
|
| 36 | 39 |
import fr.ird.observe.client.datasource.editor.api.content.referential.ContentReferentialUIModelStates;
|
| 37 | 40 |
import fr.ird.observe.dto.reference.ReferentialDtoReference;
|
| ... | ... | @@ -74,6 +77,15 @@ public class ShowTechnicalInformations<U extends ContentUI> extends ContentUIAct |
| 74 | 77 |
ShowTechnicalInformations.init(ui, ui.getShowTechnicalInformations(), action);
|
| 75 | 78 |
}
|
| 76 | 79 |
|
| 80 |
+ public static <U extends ContentTableUI<?, ?, U>> void installAction(U ui) {
|
|
| 81 |
+ ShowIdRequest request = ui.getModel().getShowIdRequest();
|
|
| 82 |
+ ShowTechnicalInformations<U> action = new ShowTechnicalInformations<>(request, new ShowIdExecutor(ui.getHandler().getDecoratorService(), ui.getToggleConfigure()));
|
|
| 83 |
+ ui.getTableModel().addPropertyChangeListener(ContentTableUITableModel.SELECTED_ROW_PROPERTY, evt -> request.reset());
|
|
| 84 |
+ ui.getModel().getStates().addPropertyChangeListener(ContentTableUIModelStates.PROPERTY_CAN_SAVE_ROW, evt -> request.reset());
|
|
| 85 |
+ ui.getModel().getStates().addPropertyChangeListener(ContentTableUIModelStates.PROPERTY_MODIFIED, evt -> request.reset());
|
|
| 86 |
+ ShowTechnicalInformations.init(ui, ui.getShowTechnicalInformations(), action);
|
|
| 87 |
+ }
|
|
| 88 |
+ |
|
| 77 | 89 |
public static <U extends ContentListUI<?, ?, U>> void installAction(U ui) {
|
| 78 | 90 |
ShowIdRequest request = ui.getModel().getShowIdRequest();
|
| 79 | 91 |
ShowTechnicalInformations<U> action = new ShowTechnicalInformations<>(request, new ShowIdExecutor(ui.getHandler().getDecoratorService(), ui.getToggleConfigure()));
|
| ... | ... | @@ -19,39 +19,40 @@ |
| 19 | 19 |
-->
|
| 20 | 20 |
|
| 21 | 21 |
<fr.ird.observe.client.datasource.editor.api.content.ContentUI
|
| 22 |
- abstract='true'
|
|
| 23 |
- genericType='D extends DataDto, C extends DataDto, U extends ContentTableUI<D, C, U>'
|
|
| 24 |
- implements="fr.ird.observe.client.datasource.editor.api.content.EditableContentUI<D>">
|
|
| 22 |
+ abstract='true'
|
|
| 23 |
+ genericType='D extends DataDto, C extends DataDto, U extends ContentTableUI<D, C, U>'
|
|
| 24 |
+ implements="fr.ird.observe.client.datasource.editor.api.content.EditableContentUI<D>">
|
|
| 25 | 25 |
|
| 26 |
- <import>
|
|
| 26 |
+ <import>
|
|
| 27 | 27 |
|
| 28 |
- fr.ird.observe.client.util.ObserveBlockingLayerUI
|
|
| 29 |
- fr.ird.observe.client.datasource.validation.ObserveSwingValidator
|
|
| 28 |
+ fr.ird.observe.client.util.ObserveBlockingLayerUI
|
|
| 29 |
+ fr.ird.observe.client.datasource.validation.ObserveSwingValidator
|
|
| 30 | 30 |
|
| 31 |
- org.nuiton.jaxx.validator.swing.SwingValidator
|
|
| 32 |
- fr.ird.observe.dto.data.DataDto
|
|
| 31 |
+ org.nuiton.jaxx.validator.swing.SwingValidator
|
|
| 32 |
+ fr.ird.observe.dto.data.DataDto
|
|
| 33 | 33 |
|
| 34 |
- java.awt.Dimension
|
|
| 34 |
+ java.awt.Dimension
|
|
| 35 | 35 |
|
| 36 |
- javax.swing.UIManager
|
|
| 36 |
+ javax.swing.UIManager
|
|
| 37 | 37 |
|
| 38 |
- static io.ultreia.java4all.i18n.I18n.n
|
|
| 39 |
- static io.ultreia.java4all.i18n.I18n.t
|
|
| 40 |
- </import>
|
|
| 38 |
+ static io.ultreia.java4all.i18n.I18n.n
|
|
| 39 |
+ static io.ultreia.java4all.i18n.I18n.t
|
|
| 40 |
+ </import>
|
|
| 41 | 41 |
|
| 42 |
- <ContentTableUIModel id='model' genericType='D, C'/>
|
|
| 43 |
- <ContentTableUIModelStates id='states' genericType='D, C'/>
|
|
| 44 |
- <ContentTableUITableModel id='tableModel' genericType='D, C, U' initializer='null'/>
|
|
| 45 |
- <DataDto id='bean' initializer='getStates().getBean()'/>
|
|
| 46 |
- <DataDto id='tableEditBean' initializer='getStates().getTableEditBean()'/>
|
|
| 42 |
+ <ContentTableUIModel id='model' genericType='D, C'/>
|
|
| 43 |
+ <ContentTableUIModelStates id='states' genericType='D, C'/>
|
|
| 44 |
+ <ContentTableUITableModel id='tableModel' genericType='D, C, U' initializer='null'/>
|
|
| 45 |
+ <DataDto id='bean' initializer='getStates().getBean()'/>
|
|
| 46 |
+ <DataDto id='tableEditBean' initializer='getStates().getTableEditBean()'/>
|
|
| 47 | 47 |
|
| 48 |
- <!-- selection model in table -->
|
|
| 49 |
- <ListSelectionModel id='selectionModel' initializer='getTableModel().getSelectionModel()' onValueChanged='getHandler().updateEditor(event)'/>
|
|
| 48 |
+ <!-- selection model in table -->
|
|
| 49 |
+ <ListSelectionModel id='selectionModel' initializer='getTableModel().getSelectionModel()'
|
|
| 50 |
+ onValueChanged='getHandler().updateEditor(event)'/>
|
|
| 50 | 51 |
|
| 51 |
- <!-- to block entry editor -->
|
|
| 52 |
- <ContentTableEditorLayerUI id='editorBlockLayerUI' constructorParams="this" styleClass="blockBlockLayerUI"/>
|
|
| 52 |
+ <!-- to block entry editor -->
|
|
| 53 |
+ <ContentTableEditorLayerUI id='editorBlockLayerUI' constructorParams="this" styleClass="blockBlockLayerUI"/>
|
|
| 53 | 54 |
|
| 54 |
- <script><![CDATA[
|
|
| 55 |
+ <script><![CDATA[
|
|
| 55 | 56 |
|
| 56 | 57 |
@Override
|
| 57 | 58 |
public abstract ContentTableUIHandler<D, C, U> getHandler();
|
| ... | ... | @@ -64,94 +65,94 @@ public void resetEdit() { |
| 64 | 65 |
}
|
| 65 | 66 |
|
| 66 | 67 |
]]>
|
| 67 |
- </script>
|
|
| 68 |
- |
|
| 69 |
- <JPanel id="body" layout='{new BorderLayout()}'>
|
|
| 70 |
- |
|
| 71 |
- <JPanel id='hideForm' layout='{new BorderLayout()}' constraints="BorderLayout.CENTER">
|
|
| 72 |
- <JLabel id='hideFormInformation'/>
|
|
| 73 |
- </JPanel>
|
|
| 74 |
- <JPanel id='emptyForm' layout='{new BorderLayout()}' constraints="BorderLayout.CENTER">
|
|
| 75 |
- <JLabel id='emptyFormInformation'/>
|
|
| 76 |
- </JPanel>
|
|
| 77 |
- |
|
| 78 |
- <Table id='showForm' insets="0" weightx="1" constraints="BorderLayout.CENTER">
|
|
| 79 |
- |
|
| 80 |
- <row weighty="0.3">
|
|
| 81 |
- <cell fill="both">
|
|
| 82 |
- <!-- table with all entries -->
|
|
| 83 |
- <JScrollPane id='tableScrollPane' decorator="boxed">
|
|
| 84 |
- <JTable id='table'/>
|
|
| 85 |
- </JScrollPane>
|
|
| 86 |
- </cell>
|
|
| 87 |
- </row>
|
|
| 88 |
- <row>
|
|
| 89 |
- <cell fill="both">
|
|
| 90 |
- |
|
| 91 |
- <!-- to edit the selected entry -->
|
|
| 92 |
- <Table id='editor' fill='both' insets='0' decorator='boxed'>
|
|
| 93 |
- |
|
| 94 |
- <!-- Entry editor panel -->
|
|
| 68 |
+ </script>
|
|
| 69 |
+ |
|
| 70 |
+ <JPanel id="body" layout='{new BorderLayout()}'>
|
|
| 71 |
+ |
|
| 72 |
+ <JPanel id='hideForm' layout='{new BorderLayout()}' constraints="BorderLayout.CENTER">
|
|
| 73 |
+ <JLabel id='hideFormInformation'/>
|
|
| 74 |
+ </JPanel>
|
|
| 75 |
+ <JPanel id='emptyForm' layout='{new BorderLayout()}' constraints="BorderLayout.CENTER">
|
|
| 76 |
+ <JLabel id='emptyFormInformation'/>
|
|
| 77 |
+ </JPanel>
|
|
| 78 |
+ |
|
| 79 |
+ <Table id='showForm' insets="0" weightx="1" constraints="BorderLayout.CENTER">
|
|
| 80 |
+ |
|
| 81 |
+ <row weighty="0.3">
|
|
| 82 |
+ <cell fill="both">
|
|
| 83 |
+ <!-- table with all entries -->
|
|
| 84 |
+ <JScrollPane id='tableScrollPane' decorator="boxed">
|
|
| 85 |
+ <JTable id='table'/>
|
|
| 86 |
+ </JScrollPane>
|
|
| 87 |
+ </cell>
|
|
| 88 |
+ </row>
|
|
| 95 | 89 |
<row>
|
| 96 |
- <cell fill='both' weightx='1'>
|
|
| 97 |
- <Table id='editorPanel' decorator='boxed'/>
|
|
| 98 |
- </cell>
|
|
| 90 |
+ <cell fill="both">
|
|
| 91 |
+ |
|
| 92 |
+ <!-- to edit the selected entry -->
|
|
| 93 |
+ <Table id='editor' fill='both' insets='0' decorator='boxed'>
|
|
| 94 |
+ |
|
| 95 |
+ <!-- Entry editor panel -->
|
|
| 96 |
+ <row>
|
|
| 97 |
+ <cell fill='both' weightx='1'>
|
|
| 98 |
+ <Table id='editorPanel' decorator='boxed'/>
|
|
| 99 |
+ </cell>
|
|
| 100 |
+ </row>
|
|
| 101 |
+ |
|
| 102 |
+ <!--Entry editor actions -->
|
|
| 103 |
+ <row>
|
|
| 104 |
+ <cell>
|
|
| 105 |
+ <Table fill='both' id='editorActions'>
|
|
| 106 |
+ <row>
|
|
| 107 |
+ <cell weightx='1'>
|
|
| 108 |
+ <!-- Reset entry form -->
|
|
| 109 |
+ <JButton id='resetEntry'/>
|
|
| 110 |
+ </cell>
|
|
| 111 |
+ <cell weightx='1'>
|
|
| 112 |
+ <JPanel layout="{new GridLayout(1,0)}">
|
|
| 113 |
+ <!-- Save entry form -->
|
|
| 114 |
+ <JButton id='saveEntry'/>
|
|
| 115 |
+ <!-- Save entry form and create a new entry -->
|
|
| 116 |
+ <JButton id='saveAndNewEntry'/>
|
|
| 117 |
+ </JPanel>
|
|
| 118 |
+ </cell>
|
|
| 119 |
+ <cell weightx='1'>
|
|
| 120 |
+ <!-- Delete selected entry (only for update mode))-->
|
|
| 121 |
+ <JButton id='deleteEntry'/>
|
|
| 122 |
+ </cell>
|
|
| 123 |
+ </row>
|
|
| 124 |
+ </Table>
|
|
| 125 |
+ </cell>
|
|
| 126 |
+ </row>
|
|
| 127 |
+ </Table>
|
|
| 128 |
+ </cell>
|
|
| 99 | 129 |
</row>
|
| 100 |
- |
|
| 101 |
- <!--Entry editor actions -->
|
|
| 102 | 130 |
<row>
|
| 103 |
- <cell>
|
|
| 104 |
- <Table fill='both' id='editorActions'>
|
|
| 105 |
- <row>
|
|
| 106 |
- <cell weightx='1'>
|
|
| 107 |
- <!-- Reset entry form -->
|
|
| 108 |
- <JButton id='resetEntry'/>
|
|
| 109 |
- </cell>
|
|
| 110 |
- <cell weightx='1'>
|
|
| 111 |
- <JPanel layout="{new GridLayout(1,0)}">
|
|
| 112 |
- <!-- Save entry form -->
|
|
| 113 |
- <JButton id='saveEntry'/>
|
|
| 114 |
- <!-- Save entry form and create a new entry -->
|
|
| 115 |
- <JButton id='saveAndNewEntry'/>
|
|
| 116 |
- </JPanel>
|
|
| 117 |
- </cell>
|
|
| 118 |
- <cell weightx='1'>
|
|
| 119 |
- <!-- Delete selected entry (only for update mode))-->
|
|
| 120 |
- <JButton id='deleteEntry'/>
|
|
| 121 |
- </cell>
|
|
| 122 |
- </row>
|
|
| 123 |
- </Table>
|
|
| 124 |
- </cell>
|
|
| 131 |
+ <cell fill="both">
|
|
| 132 |
+ <Table id='extraZone' decorator='boxed'/>
|
|
| 133 |
+ </cell>
|
|
| 125 | 134 |
</row>
|
| 126 |
- </Table>
|
|
| 127 |
- </cell>
|
|
| 128 |
- </row>
|
|
| 129 |
- <row>
|
|
| 130 |
- <cell fill="both">
|
|
| 131 |
- <Table id='extraZone' decorator='boxed'/>
|
|
| 132 |
- </cell>
|
|
| 133 |
- </row>
|
|
| 135 |
+ </Table>
|
|
| 136 |
+ </JPanel>
|
|
| 137 |
+ <!--Main editor actions -->
|
|
| 138 |
+ <Table id="actions" weightx='1' insets='0' fill="both">
|
|
| 139 |
+ <row fill="both">
|
|
| 140 |
+ <cell weightx="0.5">
|
|
| 141 |
+ <JButton id='reset'/>
|
|
| 142 |
+ </cell>
|
|
| 143 |
+ <cell weightx="0.5">
|
|
| 144 |
+ <JButton id='save'/>
|
|
| 145 |
+ </cell>
|
|
| 146 |
+ </row>
|
|
| 134 | 147 |
</Table>
|
| 135 |
- </JPanel>
|
|
| 136 |
- <!--Main editor actions -->
|
|
| 137 |
- <Table id="actions" weightx='1' insets='0' fill="both">
|
|
| 138 |
- <row fill="both">
|
|
| 139 |
- <cell weightx="0.5">
|
|
| 140 |
- <JButton id='reset'/>
|
|
| 141 |
- </cell>
|
|
| 142 |
- <cell weightx="0.5">
|
|
| 143 |
- <JButton id='save'/>
|
|
| 144 |
- </cell>
|
|
| 145 |
- </row>
|
|
| 146 |
- </Table>
|
|
| 147 |
- <JPanel id="invisible">
|
|
| 148 |
- <!--Table actions -->
|
|
| 149 |
- <JToolBar id="selectToolbar">
|
|
| 150 |
- <JButton id="selectFirstTableEntry"/>
|
|
| 151 |
- <JButton id="selectPreviousTableEntry"/>
|
|
| 152 |
- <JButton id="selectNextTableEntry"/>
|
|
| 153 |
- <JButton id="selectLastTableEntry"/>
|
|
| 154 |
- </JToolBar>
|
|
| 155 |
- </JPanel>
|
|
| 156 |
- |
|
| 148 |
+ <JPanel id="invisible">
|
|
| 149 |
+ <!--Table actions -->
|
|
| 150 |
+ <JToolBar id="selectToolbar">
|
|
| 151 |
+ <JButton id="selectFirstTableEntry"/>
|
|
| 152 |
+ <JButton id="selectPreviousTableEntry"/>
|
|
| 153 |
+ <JButton id="selectNextTableEntry"/>
|
|
| 154 |
+ <JButton id="selectLastTableEntry"/>
|
|
| 155 |
+ </JToolBar>
|
|
| 156 |
+ </JPanel>
|
|
| 157 |
+ <JMenuItem id='showTechnicalInformations'/>
|
|
| 157 | 158 |
</fr.ird.observe.client.datasource.editor.api.content.ContentUI>
|
| ... | ... | @@ -112,3 +112,7 @@ |
| 112 | 112 |
verticalAlignment:"center";
|
| 113 | 113 |
horizontalAlignment:"center";
|
| 114 | 114 |
}
|
| 115 |
+ |
|
| 116 |
+#showTechnicalInformations {
|
|
| 117 |
+ enabled:{!states.isCreatingMode() && !tableModel.isCreate() && tableModel.getSelectedRow() > -1};
|
|
| 118 |
+}
|
| ... | ... | @@ -26,6 +26,7 @@ import fr.ird.observe.client.datasource.editor.api.content.ContentMode; |
| 26 | 26 |
import fr.ird.observe.client.datasource.editor.api.content.ContentUIHandler;
|
| 27 | 27 |
import fr.ird.observe.client.datasource.editor.api.content.actions.InsertMenuAction;
|
| 28 | 28 |
import fr.ird.observe.client.datasource.editor.api.content.actions.create.CreateNewContentTableUIEntry;
|
| 29 |
+import fr.ird.observe.client.datasource.editor.api.content.actions.id.ShowTechnicalInformations;
|
|
| 29 | 30 |
import fr.ird.observe.client.datasource.editor.api.content.actions.mode.ChangeMode;
|
| 30 | 31 |
import fr.ird.observe.client.datasource.editor.api.content.actions.mode.ChangeModeExecutor;
|
| 31 | 32 |
import fr.ird.observe.client.datasource.editor.api.content.actions.mode.ChangeModeProducer;
|
| ... | ... | @@ -132,7 +133,7 @@ public abstract class ContentTableUIHandler<D extends DataDto, C extends DataDto |
| 132 | 133 |
ResetEntry.init(ui, ui.getResetEntry(), ResetEntry.class);
|
| 133 | 134 |
SaveAndNewEntry.init(ui, ui.getSaveAndNewEntry(), SaveAndNewEntry.class);
|
| 134 | 135 |
DeleteEntry.init(ui, ui.getDeleteEntry(), DeleteEntry.class);
|
| 135 |
- |
|
| 136 |
+ ShowTechnicalInformations.installAction(ui);
|
|
| 136 | 137 |
getComponent(JButton.class, "importData").ifPresent(e -> ImportDataFile.installAction(ui, e));
|
| 137 | 138 |
getComponent(JButton.class, "deleteData").ifPresent(e -> DeleteDataFile.installAction(ui, e));
|
| 138 | 139 |
getComponent(JButton.class, "exportData").ifPresent(e -> ExportDataFile.installAction(ui, e));
|
| ... | ... | @@ -22,6 +22,7 @@ |
| 22 | 22 |
package fr.ird.observe.client.datasource.editor.api.content.data.table;
|
| 23 | 23 |
|
| 24 | 24 |
import fr.ird.observe.client.datasource.editor.api.content.ContentUI;
|
| 25 |
+import fr.ird.observe.client.datasource.editor.api.content.actions.id.ShowIdRequest;
|
|
| 25 | 26 |
import fr.ird.observe.client.datasource.editor.api.content.actions.save.SaveRequest;
|
| 26 | 27 |
import fr.ird.observe.client.datasource.editor.api.content.data.simple.ContentSimpleUIModelSupport;
|
| 27 | 28 |
import fr.ird.observe.client.datasource.editor.api.content.data.table.sortable.SortableTableUI;
|
| ... | ... | @@ -29,6 +30,7 @@ import fr.ird.observe.client.datasource.editor.api.navigation.tree.NavigationNod |
| 29 | 30 |
import fr.ird.observe.client.util.init.DefaultUIInitializerResult;
|
| 30 | 31 |
import fr.ird.observe.dto.data.DataDto;
|
| 31 | 32 |
import fr.ird.observe.dto.form.Form;
|
| 33 |
+import fr.ird.observe.dto.reference.DtoReference;
|
|
| 32 | 34 |
import fr.ird.observe.services.service.data.SimpleDataService;
|
| 33 | 35 |
import org.apache.logging.log4j.LogManager;
|
| 34 | 36 |
import org.apache.logging.log4j.Logger;
|
| ... | ... | @@ -174,4 +176,11 @@ public abstract class ContentTableUIModel<D extends DataDto, C extends DataDto> |
| 174 | 176 |
}
|
| 175 | 177 |
return super.openForm(selectedId);
|
| 176 | 178 |
}
|
| 179 |
+ |
|
| 180 |
+ public ShowIdRequest getShowIdRequest() {
|
|
| 181 |
+ return new ShowIdRequest(() -> {
|
|
| 182 |
+ C tableEditBean = ContentTableUIModel.this.getStates().getTableEditBean();
|
|
| 183 |
+ return tableEditBean == null ? null : DtoReference.toReference(getClientUIContext().getDecoratorService().getReferentialLocale(), tableEditBean);
|
|
| 184 |
+ });
|
|
| 185 |
+ }
|
|
| 177 | 186 |
}
|