Skip to Main Content

Java Development Tools

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

JSF Validation Challenges - Workspace Included Using HR Schema

eevictimJan 23 2012 — edited Jan 26 2012
Hello Everyone,

Using JDev 11.1.2.1.0

I've got two validation problems that are giving me absolute fits and I'm hoping someone can provide some insight. I've created a sample workspace which uses the HR schema to demonstrate my two challenges. It may be downloaded here: http://www.williverstravels.com/JDev/Forums/Threads/2336768/JSFValidationChallenge.zip

Be sure to modify the workspace's connection to the HR schema with your username and password! I changed mine from the default.


*1) Challenge #1* ( ModelValidationChallenge.jspx )

- To see the issue, run ModelValidationChallenge.jspx and select an item from the drop-down list.
- Country entity has a RegionId field. This field's setter method in CountryImpl sets the Population field to read "A bunch!". However, before the setter method can be called, a red validation outline is thrown due to Population's field being set to mandatory.
- In my primary use case, I have a list of customers that when selected loads default values into such fields as PaymentTerms, Address, Commission, etc. through the entity's CustomerId setter method.

*2) Challenge #2* ( RowValidationChallenge.jspx )

- To see the issue, run RowValidationChallege.jspx, insert a row into the detail view, and then select a value from the DepartmentId's inputLOV. Validation will fire for fields which should only be checked upon submit.
- Note that I am using my own LOV binding as defined in the PageDef file.
- In my primary use case, I have an Order / OrderRows Master-Detail view. When a customer adds an OrderRow, they have the option of selecting an Item from an LOV. However, upon LOV selection in the popup, validation fires for the Qty field. I do not wish to set a default Qty of 1. The user needs to enter a Qty. Otherwise, the customer could forget to set the correct Qty.


Any help at all would be appreciated. I've spent a great deal of time on this myself, but my JSF Validation knowledge is sorely lacking. If there is anything else I can provide, please let me know.

Thanks,
Will
This post has been answered by Suganth on Jan 25 2012
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 23 2012
Added on Jan 23 2012
9 comments
299 views