protected void vendorSearch() {
   VendorValue vendorVal = (VendorValue) VendorLookup.showModalLookup(Constants.VENDOR_TYPE_BARGE);
   log.debug(vendorVal);
   this.getModel().getClientValueObjectProxy().setChanged();
   ((BargeTariffValue) getModel()).setVendorId(vendorVal.getId().longValue());
   ((BargeTariffValue) getModel()).setVendorName(vendorVal.getName());
   vendor.setText(vendorVal.getName());
 }
  /**
   * Ruft einen Dialog zur Auswahl des Vendors auf und setzt den Wert entsprechen der Auswahl.
   *
   * @see Mantis 4078: Wechsel zu TFG Vendor verhindern.
   */
  private void searchVendor() {
    VendorValue vendor = (VendorValue) VendorLookup.showModalLookup();
    if (vendor != null) {

      // TFG vendor? Exit if so.
      if (checkSelectedVendor(vendor.getId(), vendorId, vendor.getName())) {
        return;
      }

      vendorName = vendor.getName();
      // vendorPriority = vendor.getPriority();
      vendorId = vendor.getId();
      vendorField.setText(vendorName);
      setVendorSelected(true);
    }
  }
  public TransportOrderPricePage(
      long vendorId,
      long price,
      long currencyId,
      String mode,
      String remarks,
      String internalRemarks)
      throws WizardException {

    // Fill possibly missing information from vendor.
    VendorValue vendorValue = loadVendor(vendorId);
    if (vendorValue != null) {
      vendorName = vendorValue.getName();
      // vendorPriority = vendorValue.getPriority();
      this.vendorId = vendorValue.getId();
    }

    panel = new JPanel(new GridBagLayout());
    panel.setBorder(BorderFactory.createEmptyBorder(0, 5, 3, 5));

    vendorField = new ContextJTextField();
    vendorField.setEnabled(false);
    vendorField.setText(vendorName);

    GridBagConstraints constraints;

    Insets insets = new Insets(0, 0, 5, 0);

    constraints = new GridBagConstraints();
    constraints.gridx = 1;
    constraints.gridy = 0;
    constraints.gridwidth = 2;
    constraints.fill = GridBagConstraints.HORIZONTAL;
    constraints.weightx = 1.0;
    constraints.insets = insets;
    panel.add(vendorField, constraints);

    vendorSearch = new TooltipJButton("Lookup");
    vendorSearch.addActionListener(
        new ActionListener() {
          public void actionPerformed(ActionEvent e) {
            searchVendor();
          }
        });
    setLookupButtonEnable(vendorId, vendorSearch);

    constraints = new GridBagConstraints();
    constraints.gridx = 3;
    constraints.gridy = 0;
    constraints.anchor = GridBagConstraints.WEST;
    constraints.insets = new Insets(0, 5, 5, 0);
    panel.add(vendorSearch, constraints);

    JLabel vendorLabel = new JLabel("Vendor");
    vendorLabel.setLabelFor(vendorSearch);
    vendorLabel.setDisplayedMnemonic('V');

    constraints = new GridBagConstraints();
    constraints.gridx = 0;
    constraints.gridy = 0;
    constraints.anchor = GridBagConstraints.WEST;
    constraints.insets = insets;
    panel.add(vendorLabel, constraints);

    priceTextField = new CurrencyJTextField(this, 2);
    priceTextField.setColumns(6);
    priceTextField.setNumber(price);
    priceTextField.setMinimumSize(priceTextField.getPreferredSize());

    constraints = new GridBagConstraints();
    constraints.gridx = 1;
    constraints.gridy = 1;
    constraints.anchor = GridBagConstraints.WEST;
    constraints.insets = insets;
    panel.add(priceTextField, constraints);

    JLabel priceLabel = new JLabel("Price");
    priceLabel.setLabelFor(priceTextField);
    priceLabel.setDisplayedMnemonic('P');

    constraints = new GridBagConstraints();
    constraints.gridx = 0;
    constraints.gridy = 1;
    constraints.anchor = GridBagConstraints.WEST;
    constraints.insets = insets;
    panel.add(priceLabel, constraints);

    currencyBox = new CurrencyBox(true);
    currencyBox.setSelectedCurrencyId(currencyId);
    // Mit der Auswahl der Waehrung gibt es noch zu viele potentielle Fallstricke, nicht fuer 1.8.0.
    currencyBox.setEnabled(false);

    constraints = new GridBagConstraints();
    constraints.gridx = 2;
    constraints.gridy = 1;
    constraints.anchor = GridBagConstraints.WEST;
    constraints.insets = new Insets(0, 5, 5, 0);
    panel.add(currencyBox, constraints);

    presetmodeBox = new JComboBox(PRESET_MODES);
    presetmodeBox.setEnabled(false);
    presetmodeBox.setSelectedItem(mode);

    constraints = new GridBagConstraints();
    constraints.gridx = 1;
    constraints.gridy = 2;
    constraints.anchor = GridBagConstraints.WEST;
    constraints.insets = insets;
    panel.add(presetmodeBox, constraints);

    JLabel modeLabel = new JLabel("Mode");
    modeLabel.setLabelFor(presetmodeBox);
    modeLabel.setDisplayedMnemonic('M');

    constraints = new GridBagConstraints();
    constraints.gridx = 0;
    constraints.gridy = 2;
    constraints.anchor = GridBagConstraints.WEST;
    constraints.insets = insets;
    panel.add(modeLabel, constraints);

    remarksTextArea = new ContextJTextArea();
    remarksTextArea.setText(remarks);
    remarksTextArea.setRows(10);
    remarksTextArea.setColumns(30);

    constraints = new GridBagConstraints();
    constraints.gridx = 1;
    constraints.gridy = 3;
    constraints.gridwidth = 3;
    constraints.fill = GridBagConstraints.BOTH;
    constraints.weightx = 1.0;
    constraints.weighty = 1.0;
    constraints.insets = insets;
    panel.add(new MetaScrollPane(remarksTextArea), constraints);

    JLabel remarkLabel = new JLabel("Remarks");
    remarkLabel.setLabelFor(remarksTextArea);
    remarkLabel.setDisplayedMnemonic('R');

    constraints = new GridBagConstraints();
    constraints.gridx = 0;
    constraints.gridy = 3;
    constraints.anchor = GridBagConstraints.NORTHWEST;
    constraints.insets = insets;
    panel.add(remarkLabel, constraints);

    internalRemarksTextArea = new ContextJTextArea();
    internalRemarksTextArea.setText(internalRemarks);
    internalRemarksTextArea.setRows(10);
    internalRemarksTextArea.setColumns(30);

    // VERSION_TOGGLE OrderPlacement.InternalRemarks Start ----------
    if (ResourceUtil.getBoolean("OrderPlacement.InternalRemarks")) {
      constraints = new GridBagConstraints();
      constraints.gridx = 1;
      constraints.gridy = 4;
      constraints.gridwidth = 3;
      constraints.fill = GridBagConstraints.BOTH;
      constraints.weightx = 1.0;
      constraints.weighty = 1.0;
      panel.add(new MetaScrollPane(internalRemarksTextArea), constraints);

      JLabel internalRemarksLabel = new JLabel("Internal Remarks");
      internalRemarksLabel.setLabelFor(internalRemarksTextArea);
      internalRemarksLabel.setDisplayedMnemonic('I');

      constraints = new GridBagConstraints();
      constraints.gridx = 0;
      constraints.gridy = 4;
      constraints.anchor = GridBagConstraints.NORTHWEST;
      panel.add(internalRemarksLabel, constraints);
    }
    // VERSION_TOGGLE OrderPlacement.InternalRemarks End ----------

    update();
  }