Learn more. Asked 5 years, 8 months ago. Active 5 years, 8 months ago. Viewed times. Improve this question. Add a comment. Active Oldest Votes. Improve this answer. This is not correct. Explanation on noSelectionOption can be found here: stackoverflow. Sign up or log in Sign up using Google. Sign up using Facebook. Community Bot 1 1 1 silver badge. Chris Chris 3 3 gold badges 14 14 silver badges 38 38 bronze badges.
This indicates that the equals of your Category is missing or broken. Show it. Seams like the Category equals never get invoked. But the one for the Sector does. Also the getAsString method doesn't get invoked on the Category bean class. Why does not the equals get invoked for one class but for another when they look identical? Add a comment. Active Oldest Votes. Thank you for your time, and hope the post can be useful to someone else.
Improve this answer. Sign up or log in Sign up using Google. Sign up using Facebook. Sign up using Email and Password. I thought a customer validator would work but apparently that doesn't keep it from using the matchValue method. Thanks for all your help! The jsf-ibm. Your problem is related to the actual JSF implementation, which exist of the jsf-api. If you extract those files and read the manifest file you should see the implementation brand and version.
Big chance that it is the Sun RI 1. Upgrading to RI 1. The 1. I can tell from experience, I've used Websphere 5. Well it looks like it's the 1. Not sure why it was still breaking, I'm defaulting it now and it's working correctly. Hopefully I don't run into another place where I use a customer converter and don't want it defaulted to something.
Thanks for all your help, also I was looking around your blog and you have tons of great entries! Excellent post. I am new to JSF. Your blog helped me alot. Thanks Once again HimSss. Hey there BalusC, First of all, again a very interesting read!
Informative, to the point and not cluttered with "I'm so smart I use 25 paragraphs to make my point" text : Do you have any experience with Seam and using Custom Converters? As far as I know it's more or less the same manner of operation, though the instantiating of components is done through annotations rather then through faces-config.
Any thoughts? Unfortunately not, no. I checked this document , but I can't seem to find anything about annotated converters. Try posting this question at their own forum. Good luck. Thanks for the post. It is really helpful.
From what I can tell this should work for other tags as well such as h:selectOneRadio. Has anybody tried it and had it work sucessfully? I tried with radio buttons and had no luck. It seems to call the converter and properly convert the objects to strings ID's , but the correct previously selected option is not checked when I go to the page. Any suggestions??? Thanks for the very informative article. One thing that is still unclear to me is how can I create dependent select boxed where change in value in one combo changes the list of values in other combo.
It will be very helpful if you provide some information on it. Balus, First Off, I love you man Second, is there any way I can send you my code so you take a look at it. I've followed every step of your article but I'm still getting the "Conversion Error setting value '' for 'null Converter'" error. I'd copy and paste them here but the number of characters exceeds the blog limit.
I can show you some right now though: whoops, no I can't, not even the Java, think the generics get interpreted as html. Well, anyway, if there's a way I can send you my files I'd really appreciate it. I recommend to start with an unchanged copypaste of the article's code into your playground. This should work. Then build on that further. Oh, sorry, I'm a bit burned out today, I've got your code verbatim in my JDeveloper That's why I'm wanting to let you look at my files and try to see what the problem is.
I email you a war, it's like 2 mb, I'm not at work so I don't know the exact size. I am not sure what you're talking about with the 'Add' button. I am trying to populate a jsf dropdown list with values that contain Dutch characters. I'm using java 1. Prejith, this more sounds like that you have just a character encoding problem. In that case, make sure everything is set to UTF Also see this article: Unicode - How to get characters right?
Thank you for a very detailed example. I tried to use the same approach for a h:selectManyCheckbox component. The converter approach did not work. Going with the Map approach works flawlessly however. When I tried the converter approach, I tried registering the converter with converter-for-class. If murphys law is to be trusted, maybe that one deviation from your example is to blame?
However I've seen it work demonstrated by other bloggers.. The "the value is invalid" error can be caused by: 1 f:selectItems list is empty. During debugging I checked that the selectItems list was populated. It has several values. So it could be that the equals function doesn't behave as expected. One question, during post form submit , should I see the converters getAsObject method fire?
It doesn't atm when using the converter approach. I see from sun developer forum that you suggested to another user a "polluted classpath". My classpath contains maven artifacts javax. B1 Further more I'm using spring-webflow with it's spring-faces integration to the jsf implementation I mentioned. The validation error happens in the validation phase, and inside the javax. Just hit me that I'm delegating some responsability for the id to another object.
That id object also seems good to me. Thanks for the post! It has a comprehensive demonstration of the selectOneMenu UI. As said, if you don't pay attention to a few details, you'll gonna freak out.
Because you cannot pass other things than String as request parameters. That's just a HTTP limitation. HTTP is not object oriented. As to your actual problem: the problem lies somewhere else. The value is apparently already a String. Thank you for your post.
0コメント