Using the same state for mulitple model/abstract state #277
Unanswered
sfortier-sjsr
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
In my app, I have multiple forms. I have a model for each form.
They all have a similar flow with similar states :
I would like to be able to use the same « CancelledFormState » class for each of my forms instead of creating a class for the cancelled state of each form.
I obviously get the « ClassDoesNotExtendBaseClass » because my « CancelledFormState » extends from « AbstractState » instead of the specific state of for the form. But if I extends from the specific state for the form (TimeShiftStatusState), I won't be able to use the state (CompletedFormState) for the other forms state.
I can't use the same « AbstractState » for each form because they all have some specifics states and possible transitions.
Example of my actual structure :
Beta Was this translation helpful? Give feedback.
All reactions