The query dialog was expanded in 17.0 with a resizable window, a right-side import pane, and drag-and-drop support for imported parts.
Together with the underlying cm.core.part and cm.abstract.part changes, the query workflow now supports importing both parts and
product-part options, and applying them as additions or overrides in addition to the existing special-part workflow.
QueryDialog now extends ResizableDialogWindow instead of DialogWindow.
The dialog also exposes a new right-side subwindow and resize-related API.
Old: public class QueryDialog extends DialogWindow New: public class QueryDialog extends ResizableDialogWindow New: public SubWindow rightWindow New: public event clientBoundChangedEvent New: public event resizeEndEvent New: public event resizingEvent New: extend public SubWindow rightWindow() New: public sizeI minimalSize() New: public sizeI maximalSize()
If you subclass QueryDialog or depend on its window lifecycle or layout behavior, verify that your code still works with a resizable frame and with the additional rightWindow region.
The constructor now requires the owning Part in addition to the original PartSpecial.
Old: public constructor(Window parent, PartSpecial original, str label=$specialsDialog) New: public constructor(Window parent, Part part, PartSpecial original, str label=$specialsDialog)
Update custom call sites to pass the owning part when opening the special dialog.
QueryControlWindow has a broader public interface for import support, state-driven button updates, and help UI.
Old: public QueryButton specialsButton New: public Button specialsButton Old: public QueryButton removeSpecialsButton New: public Button removeSpecialsButton Old: public QueryButton exportButton New: public Button exportButton New: public SelectButton importButton New: public event specialsBtnClicked New: public event removeSpecialsBtnClicked New: public event exportBtnClicked New: public event importBtnClicked New: public event helpBtnClicked New: public str getHelpText() New: extend public void setSpecialControlEnablement(bool enable=true, bool refresh=true) New: extend public void update(customizationType state)
If you customized the top control window, update any code that assumed the controls were QueryButtons and consider hooking the new events instead of direct button callbacks.
QuerySubWindow now inherits constructors from SubWindow and adds generic control and help-dialog hooks.
Old: public class QuerySubWindow extends SubWindow New: public class QuerySubWindow extends SubWindow : inherit constructors New: public Button helpButton New: public void querySubWindowControlEventCB(Control c) New: extend public void showHelpDialog() New: extend public str getHelpText() New: extend public void queryControlEventCB(Control c)
Use queryControlEventCB when building subwindows that route child control callbacks through the shared querySubWindowControlEventCB function. Override getHelpText() if your subwindow exposes the new help button.
The following new public classes were added for query import support:
New: public class QueryImportWindow extends QuerySubWindow New: public class QueryImportTreeView extends AxTreeView New: public class QueryImportTVI extends AxColumnsTVI New: public class QueryImportPartTVI extends QueryImportTVI New: public class QueryDragEventArgs New: public class QueryGridOptionDragAnimation extends QueryGridDragAnimation New on QueryImportWindow: public str getHelpText()
These provide extension points for file import UI, imported-part tree views, popup menu handling, help dialogs, and drag/drop behavior into the query grid.
QueryDialogBehavior now includes public extension points for import-window lifecycle and import/drag handling.
Key additions include:
New: extend public SubWindow initImportWindow(QueryDialog dialog, Url url=null) New: extend public void initImportWindowEvents(SubWindow importWindow) New: extend public SubWindow rightWindow(QueryDialog dialog) New: extend public void openImportWindow(QueryDialog dialog, bool showFilePrompt=true, Url file=null) New: extend public void closeImportWindow(QueryDialog dialog, bool dispose=false) New: extend public str[] importFileFilters() New: extend public <str, str>[] getImportFileLabelsAndSuffixes() New: extend public PartImporter getImporter(str suffix) New: extend public PartImporterEnv getImporterEnv(str suffix) New: extend public void updateGridDragAnimation(QueryDialog dialog, pointI dragPoint, Object dragValue) New: extend public void beginGridDragAnimation(QueryDialog dialog, pointI dragPoint, Object dragValue) New: extend public range[] getValidDragRanges(QueryDialog dialog, Object dragValue) New: extend public bool validateImportedData(Object data, QueryDialog dialog) New: extend public bool validateImportedPart(Part part, QueryDialog dialog) New: extend public bool validatePricing(Part part, QueryDialog dialog) New: extend public void cleanImportedData(Object data)
If you provide a custom QueryDialogBehavior, review these new hooks and add overrides where needed to support import sources, validation rules, or custom drag/drop behavior.
QueryRowData and QueryPartRowData now expose customization-state and creator-management helpers.
New: extend public customizationType customizationStatus() New on QueryPartRowData: extend public void putAddition(PartCreator creator) extend public PartCreator getAddition() extend public void removeAddition() extend public void putOverride(PartCreator creator) extend public PartCreator getOverride() extend public void removeOverride()
These APIs are used by the new import workflow and are backed by the stable identity and customization APIs added in cm.core.part.Part.
New: public void closeAllQueryDialogs() New: extend public Brush getStateBrush(customizationType status) New: public int initialColumnWidth(str columnLabel) New: public str toolTipText() // on EditGridCell New: public const color ultraLightGreenColor = color(160, 190, 160)
The query dialog now opens as a resizable window with minimum and maximum bounds. A right-side import pane can be opened from the top controls, and the dialog layout now adapts to top, data, bottom, and right subwindows.
If you have automation, screenshots, or tests that assume the old fixed layout, verify them against the new resizable dialog.
The query dialog now supports importing parts from supported file types and dragging them into the grid.
Depending on the drop location and modifier state, imported parts can be inserted as additions or applied as overrides.
For product-part option import and option-row behavior, see the corresponding cm.abstract.part.query migration notes.
Rows are also highlighted by customization type:
If you have custom code around row selection, grid rendering, or part customization state, verify that it behaves correctly with added and overridden rows.
The query dialog and import panel now expose help buttons backed by QuerySubWindow.showHelpDialog() and per-window getHelpText() implementations. If you replace or subclass QueryControlWindow or QueryImportWindow, verify that your layout and control callbacks account for the new cHelpBtnKey / helpButton path.
When an imported part has inconsistent pricing data, the user can now be prompted to either use the calculated list price or apply the imported list price as a manual adjustment. If you have workflows that depend on imported list prices being accepted without prompting, review the new validation behavior.
The imported-part workflow relies on Part.sourceId()-based identity and the new Part addition/override APIs from cm.core.part.
If your custom parts do not provide a stable source id, imported additions, overrides, specials, or annotations may not map back to the intended logical part.
PartMakeSpecialDialog now converts the amount shown in the dialog to calculation currency for display, and converts it back when generating the saved PartSpecial.
If you compare displayed amounts to stored part-main-currency values, account for this conversion.