Class DonationAmountController
java.lang.Object
ui.controller.donation.DonationAmountController
- All Implemented Interfaces:
DonationSessionAware
Controller for the donation amount selection page.
Handles amount input validation and navigation in the donation flow.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidValidates the entered amount and continues to the next step in the donation flow.voidsetDonationSession(DonationSession donationSession) Sets the current donation session and updates the organization label.voidSets the callback to invoke when the user navigates back.voidsetOnContinue(Consumer<DonationSession> onContinue) Sets the callback to invoke when the user continues to the next step.
-
Constructor Details
-
DonationAmountController
public DonationAmountController()
-
-
Method Details
-
setDonationSession
Sets the current donation session and updates the organization label.- Specified by:
setDonationSessionin interfaceDonationSessionAware- Parameters:
donationSession- the active donation session
-
setOnContinue
Sets the callback to invoke when the user continues to the next step.- Parameters:
onContinue- the callback with the updated donation session
-
setOnBack
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.
-