private void handleEditOffer() { String webKey = decodeStringArgument(); Integer id = AcUspsDomesticSkeletonRouteOfferTools.getIdFromWebKey(webKey); if (id == null) error("Invalid offer id."); getPageSession().setUspsDomesticSkeletonRouteOfferWebKey(webKey); AcUspsDomesticSkeletonRouteOfferEditPage.instance.print(); }
private void handleDeleteOffer() { String webKey = decodeStringArgument(); Integer id = AcUspsDomesticSkeletonRouteOfferTools.getIdFromWebKey(webKey); if (id == null) error("Invalid offer id."); getUspsDomesticSkeletonRouteOfferService().delete(id); print(); }
private ScControl createOffersGrid() { AcUspsDomesticSkeletonRouteOfferTools x = AcUspsDomesticSkeletonRouteOfferTools.instance; ScGridColumnContainer<AcUspsDomesticSkeletonRouteOffer> actions = x.newColumnLink() .appendWebKeyLink("Edit", newEditOfferCommand(), null, false) .appendWebKeyLink( "Delete", newDeleteOfferCommand(), "Are you sure you want to delete this offer?", false); _offerGrid = new ScGrid<AcUspsDomesticSkeletonRouteOffer>(); _offerGrid.disablePagination(); _offerGrid.disableSorting(); _offerGrid.addColumn(x.newFrequencyColumn("Frequency")); _offerGrid.addColumn( x.newDomesticScheduleCapacityColumn(x.newDomesticWeightTitleAdaptor("Capacity"))); _offerGrid.addColumn(actions); return _offerGrid; }