public void validate() {
    panel.saveSelection();

    ArrayList<Integer> selection = getSelection();
    if (selection != null && selection.size() > 0 && isSelectionActive()) panel.generate();
    else panel.dispose();
  }
 /**
  * Static Init.
  *
  * <pre>
  *  selPanel (tabbed)
  *      fOrg, fBPartner
  *      scrollPane & miniTable
  *  genPanel
  *      info
  *  </pre>
  *
  * @throws Exception
  */
 void jbInit() throws Exception {
   lOrder.setLabelFor(fOrder);
   lLocator.setLabelFor(fLocator);
   lLocatorTo.setLabelFor(fLocatorTo);
   lBPartner.setLabelFor(fBPartner);
   lBPartner.setText("BPartner");
   panel.getParameterPanel().add(lOrder, null);
   panel.getParameterPanel().add(fOrder, null);
   panel.getParameterPanel().add(lLocator, null);
   panel.getParameterPanel().add(fLocator, null);
   panel.getParameterPanel().add(lLocatorTo, null);
   panel.getParameterPanel().add(fLocatorTo, null);
   panel.getParameterPanel().add(lBPartner, null);
   panel.getParameterPanel().add(fBPartner, null);
 } //	jbInit
  /** Dynamic Init. - Create GridController & Panel - AD_Column_ID from C_Order */
  public void dynInit() throws Exception {
    // Order Distribution
    MLookup orderL =
        MLookupFactory.get(
            Env.getCtx(),
            m_WindowNo,
            0,
            MColumn.getColumn_ID(MDDOrder.Table_Name, MDDOrder.COLUMNNAME_DD_Order_ID),
            DisplayType.Search);
    fOrder = new VLookup(MDDOrder.COLUMNNAME_DD_Order_ID, true, false, true, orderL);
    lOrder.setText(Msg.translate(Env.getCtx(), MDDOrder.COLUMNNAME_DD_Order_ID));
    fOrder.addVetoableChangeListener(this);
    lOrder.setVisible(false);
    fOrder.setVisible(false);

    MLookup llocator = MLookupFactory.get(Env.getCtx(), m_WindowNo, 0, 53950, DisplayType.TableDir);
    fLocator = new VLookup(MLocator.COLUMNNAME_M_Locator_ID, true, false, true, llocator);
    lLocator.setText(Msg.translate(Env.getCtx(), "M_Locator_ID"));
    fLocator.addVetoableChangeListener(this);
    m_M_Locator_ID = fLocator.getValue();

    MLookup llocatorto =
        MLookupFactory.get(Env.getCtx(), m_WindowNo, 0, 53949, DisplayType.TableDir);
    fLocatorTo = new VLookup("M_LocatorTo_ID", false, false, true, llocatorto);
    lLocatorTo.setText(Msg.translate(Env.getCtx(), "M_LocatorTo_ID"));
    fLocatorTo.addVetoableChangeListener(this);
    m_M_LocatorTo_ID = fLocatorTo.getValue();

    //	C_Order.C_BPartner_ID
    MLookup bpL = MLookupFactory.get(Env.getCtx(), m_WindowNo, 0, 2762, DisplayType.Search);
    fBPartner = new VLookup("C_BPartner_ID", false, false, true, bpL);
    lBPartner.setText(Msg.translate(Env.getCtx(), "C_BPartner_ID"));
    fBPartner.addVetoableChangeListener(this);
    panel.getStatusBar().setStatusLine(Msg.getMsg(Env.getCtx(), "InventoryMoveGenerateSel"));
  } //	dynInit
  /** ************************************************************************ Generate Shipments */
  public String generate() {

    return generate(panel.getStatusBar(), null);
  } //	generateShipments
 public void executeQuery() {
   executeQuery(panel.getMiniTable());
 } //  executeQuery