PDA

View Full Version : Problem with null value on bind


epleisman
Jan 28th, 2005, 11:15 AM
Ok - so lets say, as example, I have the following data & relationship:

Sale_Opportunity
[...]
LeadEntered_EmpId;
SaleMade_EmpId;
[...]

Employee
EmpId
Name
[...]

In the background I am using Hibernate and have a many-to-one
to Employee for each of the EmpId's in Sale_Opportunity.

So in the form, I want to bind and refer to the EmployeeName.

Problem is - if the Employee has not yet been associated ( as in a new record ) and is not required to be on SaveOrUpdate, then the jsp
will complain when bound.

QUESTION:
Is there a way to check for null prior to binding something like:
SaleOpp.EmployeeByLeadEnteredId.Name

OR should I NOT be binding.

Any ideas - please let me know.

Thanks

~Ed