private ScControl createFlightGrid() {
    AcUspsDomesticSkeletonRouteLegTools x = AcUspsDomesticSkeletonRouteLegTools.instance;

    ScGridColumnContainer<AcUspsDomesticSkeletonRouteLeg> actions =
        x.newColumnLink()
            .appendWebKeyLink("Edit", newEditLegCommand(), null, false)
            .appendWebKeyLink(
                "Delete",
                newDeleteLegCommand(),
                "Are you sure you want to delete this leg?",
                false);

    _flightGrid = new ScGrid<AcUspsDomesticSkeletonRouteLeg>();
    _flightGrid.disablePagination();
    _flightGrid.disableSorting();
    _flightGrid.addColumn(x.newLegNumberColumn("Leg"));
    _flightGrid.addColumn(x.newFlightNumberDisplayLabelColumn("Flight"));
    _flightGrid.addColumn(x.newDepartureLocalTmColumn("Departs"));
    _flightGrid.addColumn(x.newOriginAirportCodeColumn("Origin"));
    _flightGrid.addColumn(x.newArrivalLocalTmColumn("Arrives"));
    _flightGrid.addColumn(x.newDestinationAirportCodeColumn("Destination"));
    _flightGrid.addColumn(x.newEquipmentCodeColumn("Equipment"));
    _flightGrid.addColumn(actions);
    return _flightGrid;
  }
 private void handleDeleteLeg() {
   String webKey = decodeStringArgument();
   Integer id = AcUspsDomesticSkeletonRouteLegTools.getIdFromWebKey(webKey);
   if (id == null) error("Invalid flight id.");
   getUspsDomesticSkeletonRouteLegService().delete(id);
   print();
 }
 private void handleEditLeg() {
   String webKey = decodeStringArgument();
   Integer id = AcUspsDomesticSkeletonRouteLegTools.getIdFromWebKey(webKey);
   if (id == null) error("Invalid flight id.");
   getPageSession().setUspsDomesticSkeletonRouteLegWebKey(webKey);
   AcUspsDomesticSkeletonRouteLegEditPage.instance.print();
 }