Say you have a table with a date column and you have created a view accessing it. Now try to insert an abnormal date into the dateInput field on the page (something like 1/1/111111111), commit the changes, check the value in the DB and you’ll get what I’m talking about here. I had queried a question on the OTN forum regarding this and the only answer I got was from Frank Nimphius to
which actually just checks that the Date attribute provided is of a logical range.
This method has to be part of a class extending oracle.jbo.server.EntityImpl and obviously the entity implementation for that table with a date column must extend the new EntityImpl class.
That's it. Hope this helps!
configure a value change listener on the date field and verify that the provided value is valid, If not call FacesContext.renderResponse to ignore the requestthis is a solution, but well, it requires more or less to apply it to each dateInput field on every single page. The other way around that I finally used, was to override the EntityImpl setAttributeInternal method like the following:
which actually just checks that the Date attribute provided is of a logical range.
This method has to be part of a class extending oracle.jbo.server.EntityImpl and obviously the entity implementation for that table with a date column must extend the new EntityImpl class.
That's it. Hope this helps!
No comments:
Post a Comment