Comments (6)
I also think that it is necessary to have validations before leaving a page. And the suggestion of implementation I think is a good way to do it.
from cjwizard.
[Copied from #9 ]
I think that this must be separated from access to buttons. What I think is we need a system to prevent the next to success more or less automatically and separated from access to buttons.
So you get:
- An event driven that is called when next is begin to occur. A simply and integrated way to tell that the wizard don't must change the page (and a way for you to change text or show messages with the problems).
- Access to buttons directly to modify them (for example for text, enable/disable, or whatever advance thing you need).
But is also recommended to have both, so in the event of "check before next" you can disable the buttons. For example:
- A page with loguing credentials. You don't know if they are correct until you try.
- The user fill the inputs and press Next.
- "Check before next" is called and you check if they are correct.
- They aren't so you change a label to tell the problem to the user and disable the Next button until it change the user or the password.
from cjwizard.
I thinking what is better, have a validation event (for next and finish) or directly have onNext() and onPrev() so you can also block the back movement (for example if the page use a connection that need to be closed if user leave the page).
from cjwizard.
As I have write in the pull request "Commit 4681f30 add settings argument on the onNext and onPrev but I'm not sure if is the better way as if a page need settings to take decisions the factory can pass it through the constructor."
@creswick What do you think is better?
from cjwizard.
The pull request looked good to me, but I'm not sure I understand the thing you're worried about:
but I'm not sure if is the better way as if a page need settings to take decisions the factory can pass it through the constructor.
Could you help me understand what might cause issues?
from cjwizard.
Because we force Pages to know about WizardSettings, making WizardSettings an all must know class and sometimes this indicate a bad design. It isn't bad by itself but can indicate a bad design.
from cjwizard.
Related Issues (20)
- Scrolling the in the Wizard Panel? HOT 3
- Stack overflow on WizardPageTest (OpenJDK) HOT 11
- Temporary website is up in all its glory HOT 2
- Feature request, on before next and on before previous actions HOT 2
- README.md: dev.java.net not available any more HOT 4
- Could we have snapshots in JCenter? HOT 13
- New Slack channel HOT 5
- Add support for Java 9 and 10 HOT 4
- Refactor APageFactory, rename it AbstractPageFactory HOT 4
- Maven dependency snippet doesn't work HOT 1
- StackWizardSettings breaks java.util.Map contract HOT 22
- Demo's are broken HOT 2
- Demo logging cleanup and potentially a new demo with even more complex workflows
- Broken link in QuickStart guide HOT 3
- Where to move Maven repo? HOT 4
- Documentation needed HOT 1
- Can't download cjwizard.jar HOT 4
- Travis CI isn't running builds. HOT 4
- Fix alerts documented by LGTM HOT 1
- Write unit tests
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cjwizard.