Class DonationAmountController

java.lang.Object
ui.controller.donation.DonationAmountController
All Implemented Interfaces:
DonationSessionAware

public class DonationAmountController extends Object implements DonationSessionAware
Controller for the donation amount selection page. Handles amount input validation and navigation in the donation flow.
  • Constructor Details

    • DonationAmountController

      public DonationAmountController()
  • Method Details

    • setDonationSession

      public void setDonationSession(DonationSession donationSession)
      Sets the current donation session and updates the organization label.
      Specified by:
      setDonationSession in interface DonationSessionAware
      Parameters:
      donationSession - the active donation session
    • setOnContinue

      public void setOnContinue(Consumer<DonationSession> onContinue)
      Sets the callback to invoke when the user continues to the next step.
      Parameters:
      onContinue - the callback with the updated donation session
    • setOnBack

      public void setOnBack(Runnable onBack)
      Sets the callback to invoke when the user navigates back.
      Parameters:
      onBack - the callback to run on back navigation
    • handleContinue

      public void handleContinue()
      Validates the entered amount and continues to the next step in the donation flow.