Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

CRUD application no longer allows edit function.

 
Reginald Carter
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,
[size=12]I think I'm in quite a mess here.
I'm using Netbeans IDE and Glassfish application server.
I have a JSF CRUD application running with a MySQL database and everything was fine until I was asked to be able to sort a column whose MySQL datatype was Varchar.
Here is my Model for Vehicles:

And my Controller:

And my List View:

So I changed the datatype to Integer and updated my source code to change the column from String to Integer.
When the list displays every thing seems good and the rows are sorted according to the column whose datatype I changed to Integer.
However when I then tried to edit nothing works and I get HTTP Status 505 from Glassfish with the error message
javax.servlet.ServletException: HV000030: No validator could be found for type: java.lang.Integer
Is there anyway I can possibly fix this?
I would appreciate any help. [/size]
Thanks for reading,
G.
 
Tim Holloway
Saloon Keeper
Pie
Posts: 18097
50
Android Eclipse IDE Linux
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm afraid I charge money for wading through stuff like that.

Posting the entire source means that we have to wade through a lot of irrelevant stuff to find the critical points, and for me at least, I have to kill a tree and print it out. Always try to limit your sample problem listing to the bare essentials of code. Not only does it make it easier for us to read, there's also a chance that you may discover the problem yourself. Since one of the first things I often do with a complex problem is exactly that.

I really can't tell anything from this behemoth, although you did set off my nitpick detector by using the word "controller" in one (or more?) of your backing beans. In JSF, you do not write Controller code. It's all pre-written in the FacesServlet and the JSF tag implementations. Action methods and AJAX listeners are not part of the MVC paradigm, so their presence in a backing bean doesn't mean that the bean isn't a still a Model.
 
Reginald Carter
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for your reply.
Sorry about all the code.
I'll do better next time.
Meanwhile I have solved the problem and everything is fine now.
-Reg
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic