Skip to content
This repository has been archived by the owner on Dec 23, 2018. It is now read-only.

Multiple formwizard instances per session #10

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

Multiple formwizard instances per session #10

wants to merge 4 commits into from

Conversation

dustinlacewell
Copy link

I added a new FormWizard class and a utility class.

The new FormWizard is UniqueSessionFormWizard and it is a subclass of SessionFormWizard. The only extension is that it takes a name, which it returns when get_wizard_name is called. The utility class is called UniqueSessionFormWizardProvider and it is a view that maintains a registry of UID->UniqueSessionFormWizards. Anytime a GET request is made to the view, a new UID and corresponding wizard is created. Subsequent POST requests that contain a UID will utilize the associated wizard.

The Point:

I was using SessionFormWizard but noticed that if I was filling out a wizard on Tab1 and opened up Tab2 to the same wizard, Tab1's state was destroyed. I am developing a jQuery-ui Tab centric application so this became apparent early on. I have never submitted code to an open-source project before so if you have any comments at all just let me know and I'll try to refactor what I have to better suit your library.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant