Win a copy of Java Concurrency Live Lessons this week in the Threads forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Error With Simple Converter  RSS feed

 
vijay saraf
Ranch Hand
Posts: 141
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello All,

I am new to JSF and stucked at Simple Converter.......
I am unable to understand why i am getting java.lang.IllegalArgumentException: argument type mismatch Error
here is the code

JSP:
..........
..........

..........
..........

Bean:
..........
..........

..........
..........

however its working when i do not enter any value or when i enter alphabates
it shows errors(Validation Error: Value is required. or Conversion error occurred. respectively )as expected.
but when i enter any Numeric value then i get error as java.lang.IllegalArgumentException: argument type mismatch.
please help me to rectify the problem.
thanks.
 
vijay saraf
Ranch Hand
Posts: 141
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ya i have got.....what was wrong.....
just alter the code as
<f:converter converterId="javax.faces.Integer"/>
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!