private void save() {
    String webKey = getPageSession().getUspsInternationalSkeletonRouteWebKey();
    Integer routeId =
        AcUspsInternationalSkeletonRouteOfferSummaryVoTools.getRouteIdFromWebKey(webKey);

    AcUspsInternationalSkeletonRouteLeg e;
    e = new AcUspsInternationalSkeletonRouteLeg(getAccountCode());
    e.setUspsInternationalSkeletonRouteId(routeId);
    e.setContractNumber(_contractNumber.getValidSelectedString());
    e.setLegNumber(_legNumber.getValue());
    e.setRouteDepartureDayOffset(_departDayOffset.getValue());
    e.setCarrierCode(_listingCarrier.getSelectedString());
    e.setFlightNumber(_listingFlightNumber.getValue());
    e.setOperatorCarrierCode(_operatorCarrier.getSelectedString());
    e.setOperatorFlightNumber(_operatorFlightNumber.getValue());
    e.setOriginAirportCode(_origin.getSelectedString());
    e.setDestinationAirportCode(_destination.getSelectedString());
    e.setDepartureLocalTm(_depart.getValue());
    e.setArrivalLocalTm(_arrive.getValue());
    e.setFlightArrivalDayOffset(_arriveDayOffset.getValue());
    e.setStopCount(_stopCount.getValue());
    e.setFrequency(_daysCheckboxGroup.getValue());
    e.setEquipmentCode(_equipment.getSelectedString());
    getUspsInternationalSkeletonRouteLegService().insert(e);
  }
  private ScControl createFields() {
    AcUspsInternationalSkeletonRouteLegTools x = AcUspsInternationalSkeletonRouteLegTools.instance;

    _blockText = new ScText();
    _blockText.setLabel("Block");
    _blockText.setLabelBold(true);
    _blockText.setBold();

    _contractNumber = new ScDropdownField();
    _contractNumber.setLabel("Contract Number");
    _contractNumber.setDefaultFocus();
    _legNumber = x.newLegNumberField("Leg");
    _departDayOffset = x.newRouteDepartureDayOffsetField("Route Depart Day Offset");
    _listingCarrier = new ScDropdownField();
    _listingCarrier.setLabel("Listing Carrier");
    _listingFlightNumber = x.newFlightNumberField("Listing Flight Number");
    _operatorCarrier = new ScDropdownField();
    _operatorCarrier.setLabel("Operator Carrier");
    _operatorFlightNumber = x.newFlightNumberField("Operator Flight Number");
    _origin = x.newAirportDropdownField("Origin");
    _destination = x.newAirportDropdownField("Destination");
    _depart = x.newDepartureLocalTmField("Depart");
    _arrive = x.newArrivalLocalTmField("Arrive");
    _arriveDayOffset = x.newFlightArrivalDayOffsetField("Arrive Day Offset");
    _stopCount = x.newStopCountField("Stops");
    _daysCheckboxGroup = new ScDayFrequencyCheckboxGroup();
    _daysCheckboxGroup.setLabel("Frequency");
    _equipment = x.newEquipmentDropdownField("Equipment");

    ScContainer c = new ScContainer();
    c.useFieldLayout();
    c.add(_blockText);
    c.add(_contractNumber);
    c.add(_legNumber);
    c.add(_departDayOffset);
    c.add(_listingCarrier);
    c.add(_listingFlightNumber);
    c.add(_operatorCarrier);
    c.add(_operatorFlightNumber);
    c.add(_origin);
    c.add(_destination);
    c.add(_depart);
    c.add(_arrive);
    c.add(_arriveDayOffset);
    c.add(_stopCount);
    c.add(_daysCheckboxGroup);
    c.add(_equipment);
    return c;
  }