-
Notifications
You must be signed in to change notification settings - Fork 102
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
JSF Converters #319
Comments
Hi @lyahim, Can you please do this check? @stephanrauh: maybe this error was solved with the edit to getValue2Render of CoreRenderer don't you think? |
It doesn't seem to be solved. At least I managed to reproduce #280. I don't know about custom converters, but I've decided to start with the standard converters first. |
umh.. maybe i've missed something, because i've used custom converter but also f:convertNumber without any problem. The only difference is that i use mojarra... |
Have a look over here: http://www3.bootsfaces.net/Showcase/forms/converters.jsf Depending on your locale, the number are shown with a decimal comma (in place of the Anglo-Saxon decimal point). If you click on "calculate", the decimal fraction of the numbers gets lost. |
What would you expect other than that? The converter is set to integer only, it will convert the given String into an integer format, therefore truncating the decimal places. @lyahim You said, that you wrote a custom converter, which yielded a |
@zhedar Good point. Somehow I've missed the integer bit. However, after removing the |
@stephanrauh Well, to be fair I didn't get to run the example again, even with I feel kind dumb to say this, but I think we're probably doing something wrong. If you replace the bootsfaces input fields by standard |
OMG. Why didn't I see that: Also if conversion fails, there is a message an the label is colored red. So this is also working correctly. Just test that by entering 'a'. But it seems like JSF takes values like Edit: Just fixed that misspelling, so the showcase now works fine for me as well. |
Oops... I know I was tired yesterday, but I wasn't aware my Eclipse was tired, too... |
I'd like to add some documentation and several example of both custom and standard converter. Plus, I'd like to check if |
Having several converter examples will let us test this quickly in the future and provides further documentation, so that sounds great. I normally use Omnifaces' SelectItemsConverter with |
Let's open a follow-up ticket to document the converters more thoroughly. |
Hello All,
Can you check the converter operation? At now I try to use a converter for display number with my locale format. I cannot use <f:convertnumer /> because it's cannot display error message(#280) if the number incorrect. Therefore I made a custom converter, but when I submit the form the converter getAsObject method cannot called and I have got the ClassCastException.
I use MyFaces 2.2.9, the response message is:
Thank you,
Mihaly
The text was updated successfully, but these errors were encountered: