mk-guck opened a new issue, #7298:
URL: https://github.com/apache/hop/issues/7298

   ### Apache Hop version?
   
   2.18.0
   
   ### Java version?
   
   21.0.11
   
   ### Operating system
   
   Linux
   
   ### What happened?
   
   In the "Dynamic SQL row" transform dialog, the label
   **"Template SQL (to retrieve Meta data)"** is shown, but the multi-line SQL
   editor field that should appear directly below it is missing. There is only
   empty space between the label and the bottom of the dialog. As a result, the
   template SQL cannot be viewed or edited through the GUI.
   
   The transform itself works correctly: the template SQL stored in the `.hpl`
   file is honored at runtime (output metadata is resolved correctly). Only the
   dialog is affected — this is a UI/layout problem, not a runtime problem.
   
   ## Steps to reproduce
   1. Open a pipeline containing a "Dynamic SQL row" transform (or add a new 
one).
   2. Open the transform dialog.
   3. Observe the "Template SQL (to retrieve Meta data)" label near the bottom.
   
   ## Expected behavior
   A multi-line SQL editor (SQLStyledTextComp) is shown below the label, 
allowing
   the template SQL to be viewed and edited.
   
   ## Actual behavior
   The label is present, but the editor field below it is not rendered. The area
   remains empty. Resizing/maximizing the dialog does not make the field appear.
   
   ## Likely root cause (from source inspection)
   In `DynamicSqlRowDialog.java`, the dialog content is placed inside a
   `ScrolledComposite`:
   
   ```java
   ScrolledComposite sc = new ScrolledComposite(shell, SWT.V_SCROLL | 
SWT.H_SCROLL);
   sc.setLayout(new FillLayout());
   ...
   Composite wContent = new Composite(sc, SWT.NONE);
   ...
   sc.setContent(wContent);
   wContent.pack();
   sc.setMinSize(wContent.computeSize(SWT.DEFAULT, SWT.DEFAULT));
   ```
   
   However, `sc.setExpandHorizontal(true)` and `sc.setExpandVertical(true)` are
   never called on this `ScrolledComposite`. Without those, the content 
composite
   is not sized to the available area, and the SQL editor widget (created
   unconditionally further down) effectively receives no usable size and is not
   visible.
   
   For comparison, dialogs that use a `ScrolledComposite` correctly do set these
   flags, e.g. `DatabaseLookupDialog`, `PipelineExecutorDialog`,
   `WorkflowExecutorDialog`, `TextFileInputDialog`. `DynamicSqlRowDialog` is the
   one that omits them.
   
   ## Suggested fix
   Add the two expand calls when configuring the `ScrolledComposite`, consistent
   with the other dialogs:
   
   ```java
   sc.setExpandHorizontal(true);
   sc.setExpandVertical(true);
   ```
   
   
   ### Issue Priority
   
   Priority: 2
   
   ### Issue Component
   
   Component: Hop Gui


-- 
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]

Reply via email to