Comments (5)
I've made two pull requests, one with a mavenization of the project and one with quite a lot of changes to validation, formatting and parsing. It's possible that I've gone too far. Please review my pull requests and let me know if I need to rollback/change anything.
from numberfield.
There are quite a few changes to lines that haven't actually changed in any relevant way, and it's making it a bit hard to spot the actual changes. I try to use Vaadin Coding Conventions (except for the parts that refer to Java 6) in all my projects, so if you have time to reformat the changes according to those it would hopefully speed things up from my end a bit. The Vaadin core's extra workspace preferences would be a bonus, I'm not sure if I've remembered to add those to that particular workspace yet.
It's been a bit of a hectic week for me, sorry for the delay :(
from numberfield.
Sorry I haven't responded yet, but it's been a few extremely focused weeks and since I got the numberfield working for our case... Don't worry about its taking time.
I tried to import the vaadin coding conventions eclipse file at https://github.com/vaadin/vaadin/blob/master/eclipse/VaadinJavaConventions.xml but either IntelliJ couldn't interpret it correctly or it's just wrong. For example is the indentatino 8 spaces(?). I've tried to fix my code formatter so it matches as closely as possible and it seems to match mostly except for javadoc indents. I also updated the javadoc along the way so it may look like more changes than there actually is. The code changes in the "mavenize" pull request was due to my screwing up and using plain mv
instead of git mv
.
from numberfield.
Another solution may be to modify the method
private boolean validateValue(String value) {
if (value == null || "".equals(value)) {
return !isRequiredIndicatorVisible();
}
final boolean isValid;
if (isDecimalAllowed()) {
isValid = NumberValidator.isValidDecimal(getValueAsFormattedDecimalNumber(),
getState(), false);
} else {
isValid = NumberValidator.isValidInteger(getValueAsFormattedDecimalNumber(),
getState(), false);
}
return isValid;
}
by
private boolean validateValue(String value) {
if (value == null || "".equals(value)) {
return !isRequiredIndicatorVisible();
}
final boolean isValid;
if (isDecimalAllowed()) {
isValid = NumberValidator.isValidDecimal(getValueAsFormattedDecimalNumber(),
getState(), true);
} else {
isValid = NumberValidator.isValidInteger(getValueAsFormattedDecimalNumber(),
getState(), true);
}
return isValid;
}
from numberfield.
Same issue here.
from numberfield.
Related Issues (5)
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 numberfield.