jbs-atolcd commented on code in PR #8782:
URL: https://github.com/apache/hop/pull/8782#discussion_r4217231634
##########
plugins/transforms/sqlfileoutput/src/main/java/org/apache/hop/pipeline/transforms/sqlfileoutput/SQLFileOutputDialog.java:
##########
@@ -706,6 +765,84 @@ public void focusGained(org.eclipse.swt.events.FocusEvent
e) {
}
});
+ // Specify table fields
+ wSpecifyFields = new Button(wContentComp, SWT.CHECK);
+ wSpecifyFields.setText(
+ BaseMessages.getString(PKG,
"SQLFileOutputMeta.Content.SpecifyTableFields"));
+ PropsUi.setLook(wSpecifyFields);
+ FormData fdSpecifyFields = new FormData();
+ fdSpecifyFields.left = new FormAttachment(0, margin);
+ fdSpecifyFields.top = new FormAttachment(wGFormatEncodage, margin);
+ wSpecifyFields.setLayoutData(fdSpecifyFields);
+ wSpecifyFields.addSelectionListener(
+ new SelectionAdapter() {
+ @Override
+ public void widgetSelected(SelectionEvent e) {
+ activateFieldsTable();
+ input.setChanged();
+ }
+ });
+
+ Group wGFields = new Group(wContentComp, SWT.SHADOW_NONE);
+ PropsUi.setLook(wGFields);
+ wGFields.setText(BaseMessages.getString(PKG,
"SQLFileOutputMeta.Group.SelectFields"));
+
+ FormLayout groupFieldsLayout = new FormLayout();
+ groupFieldsLayout.marginWidth = 10;
+ groupFieldsLayout.marginHeight = 10;
+ wGFields.setLayout(groupFieldsLayout);
+
+ FormData fdGFields = new FormData();
+ fdGFields.left = new FormAttachment(0, margin);
+ fdGFields.top = new FormAttachment(wSpecifyFields, margin);
+ fdGFields.right = new FormAttachment(100, -margin);
+ fdGFields.bottom = new FormAttachment(100, -margin);
+ wGFields.setLayoutData(fdGFields);
+
+ wGet = new Button(wGFields, SWT.PUSH);
+ wGet.setText(BaseMessages.getString(PKG, "System.Button.GetFields"));
+ PropsUi.setLook(wGet);
+ FormData fdGet = new FormData();
+ fdGet.left = new FormAttachment(0, 0);
+ fdGet.bottom = new FormAttachment(100, 0);
+ wGet.setLayoutData(fdGet);
+ wGet.addListener(SWT.Selection, e -> get());
+
+ // Select fields table
+ ColumnInfo[] colinf =
+ new ColumnInfo[] {
+ new ColumnInfo(
+ BaseMessages.getString(PKG,
"SQLFileOutputMeta.Content.Fieldname"),
+ ColumnInfo.COLUMN_TYPE_CCOMBO,
+ new String[] {BaseMessages.getString(PKG,
"SQLFileOutputMeta.Content.Loading")},
+ false),
+ new ColumnInfo(
+ BaseMessages.getString(PKG,
"SQLFileOutputMeta.Content.RenameTo"),
+ ColumnInfo.COLUMN_TYPE_TEXT,
+ ValueMetaFactory.getValueMetaNames())
Review Comment:
Done.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]