Closed geziefer closed 1 year ago
Reasons seams to be that version is "91" instead of "9.1"
I’ll look into it. I guess this is in the main branch code rather than the production site? I cannot seem to be able to reproduce it on the production site.
Clarification: Does not happen in production but on current master.
It’s a good idea to test things out with the recent changes from Kito. I’ll do that myself too.
So far, cannot reproduce it in the latest code either. @geziefer, could you provide steps to reproduce including OS, browser and locale settings?
When I pull master branch as of now, do
mvn clean package wildfly:run
open
localhost:8080/jakarta-starter-ui
and then select "Jakarta EE 9.1", I don't see the selection and the log states
Validating form for Jakarta EE version: 91, Jakarta EE profile: full, Java SE version: 17, Docker: false, runtime: none
which is not covered by the switch case statement in Project.java.
It happens on Windows 11 with Chorme, Edge and Firefox (German locale) and Mac (English locale). I thought it could be the locale in case "9.1" is interpreted as a number (would be "9,1" in German, so the "." might be deleted in conversion), but as said, same happens in English locale.
We might add that directly in the view's code since conversion is done from internal value, not from user input.
If I add
locale="en-US"
to the
<f:convertNumber minFractionDigits="0" maxFractionDigits="1" />
in index.xhtml for Jakarta EE version, the selection works.
Just tested here and can't reproduce it on Mac(english Locale) using firefox or Safari. Weird
@jeyvison , @m-reza-rahman I think we should be safe to state explicitely to convert it in English number format in the view as it is only an internal value. Should I provide a PR for that?
Do you mind issuing a PR? I think this is an issue of the server-side locale rather than client side.
Should I provide a PR for that?
Yes, please. But i'd like to understand a little bit more about the issue,also. Can you please share the JVM vendor and version you're using and the JVM locale(if thats different from OS)? From the images you shared it looks like you're using German somewhere?
Yes, it might be, as it happens for me also on my Mac with English language setting. My JVM is "openjdk version "17.0.5" 2022-10-18" and if I print out my default locale it's "de_DE".
So, shouldn't be a problem for our production, but I'll file a PR with the little change, won't hurt there and might help others trying it out locally.
Got it. Thanks for the infos :)
@geziefer The PR is already merged, would mind test the latest master to confimr that #255 fixed it, please?
Yes, works fine now.
If one selects "Jakarta EE 9.1" as version, the selection does not happen (1st image below), resulting in an ugly validation error when selecting something else (2nd image below)