• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

CRUD application no longer allows edit function.

 
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Saloon Keeper
Posts: 27763
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 18
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Yeah. What he said. Totally. Wait. What? Sorry, I was looking at this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic