OpenConcerto

Dépôt officiel du code source de l'ERP OpenConcerto
sonarqube

svn://code.openconcerto.org/openconcerto

Rev

Rev 139 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 139 Rev 153
Line 16... Line 16...
16
import javax.swing.event.ChangeListener;
16
import javax.swing.event.ChangeListener;
17
 
17
 
18
import org.openconcerto.erp.config.ComptaPropsConfiguration;
18
import org.openconcerto.erp.config.ComptaPropsConfiguration;
19
import org.openconcerto.erp.config.Log;
19
import org.openconcerto.erp.config.Log;
20
import org.openconcerto.modules.extensionbuilder.Extension;
20
import org.openconcerto.modules.extensionbuilder.Extension;
-
 
21
import org.openconcerto.modules.extensionbuilder.ExtensionGroupSQLComponent;
21
import org.openconcerto.modules.extensionbuilder.list.AllTablesComboBoxModel;
22
import org.openconcerto.modules.extensionbuilder.list.AllTablesComboBoxModel;
22
import org.openconcerto.sql.element.GroupSQLComponent;
23
import org.openconcerto.sql.element.GroupSQLComponent;
23
import org.openconcerto.sql.element.SQLElement;
24
import org.openconcerto.sql.element.SQLElement;
24
import org.openconcerto.sql.model.SQLTable;
25
import org.openconcerto.sql.model.SQLTable;
25
import org.openconcerto.sql.request.RowItemDesc;
26
import org.openconcerto.sql.request.RowItemDesc;
Line 99... Line 100...
99
 
100
 
100
                final SQLElement element = ComptaPropsConfiguration.getInstanceCompta().getDirectory().getElement(t);
101
                final SQLElement element = ComptaPropsConfiguration.getInstanceCompta().getDirectory().getElement(t);
101
                if (element == null) {
102
                if (element == null) {
102
                    Log.get().warning("No element for table: " + t.getName());
103
                    Log.get().warning("No element for table: " + t.getName());
103
                }
104
                }
104
                final GroupSQLComponent gComponent = new GroupSQLComponent(element, group) {
105
                final GroupSQLComponent gComponent = new ExtensionGroupSQLComponent(element, group);
105
                    public RowItemDesc getRIVDescForId(final String id) {
-
 
106
                        return super.getRIVDescForId(t.getName() + "." + id);
-
 
107
                    }
-
 
108
 
-
 
109
                };
-
 
110
                oldGroup = group;
106
                oldGroup = group;
111
                if (previewFrame == null || !previewFrame.isVisible()) {
107
                if (previewFrame == null || !previewFrame.isVisible()) {
112
                    previewFrame = new JFrame();
108
                    previewFrame = new JFrame();
113
                    previewFrame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
109
                    previewFrame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
114
                    previewFrame.setTitle("Preview: " + group.getId());
110
                    previewFrame.setTitle("Preview: " + group.getId());
Line 139... Line 135...
139
                final SQLTable t = ComptaPropsConfiguration.getInstanceCompta().getRootSociete().getTable(n.getTable());
135
                final SQLTable t = ComptaPropsConfiguration.getInstanceCompta().getRootSociete().getTable(n.getTable());
140
                if (t == null) {
136
                if (t == null) {
141
                    return;
137
                    return;
142
                }
138
                }
143
                final SQLElement element = ComptaPropsConfiguration.getInstanceCompta().getDirectory().getElement(t);
139
                final SQLElement element = ComptaPropsConfiguration.getInstanceCompta().getDirectory().getElement(t);
144
 
-
 
145
                final GroupSQLComponent gComponent = new GroupSQLComponent(element, group);
140
                final GroupSQLComponent gComponent = new ExtensionGroupSQLComponent(element, group);
146
 
-
 
147
                previewFrame.setContentPane(new EditPanel(gComponent, EditMode.CREATION));
141
                previewFrame.setContentPane(new EditPanel(gComponent, EditMode.CREATION));
148
                previewFrame.pack();
142
                previewFrame.pack();
149
                if (!previewFrame.isVisible()) {
143
                if (!previewFrame.isVisible()) {
150
                    FrameUtil.show(previewFrame);
144
                    FrameUtil.show(previewFrame);
151
                }
145
                }