throws a DateNotFoundException. I dont want this to happen - I want to display "" if the end date is null.
So, I tried
and that didn't work.
How do I go about achieving this without making a change to the checkNotNull() function in my utility class
[ May 21, 2006: Message edited by: Mike Corleone ]
[ May 21, 2006: Message edited by: Mike Corleone ] [ May 21, 2006: Message edited by: Mike Corleone ]
MCSD, SCJP, SCWCD, SCBCD, SCJD (in progress - URLybird 1.2.1)
Richard Green
Ranch Hand
Joined: Aug 25, 2005
Posts: 536
posted
0
anyone?
Adeel Ansari
Ranch Hand
Joined: Aug 15, 2004
Posts: 2874
posted
0
Originally posted by Mike Corleone: I dont want this to happen - I want to display "" if the end date is null.
So, why are you throwing the exception. Just return an empty string would work I hope.
Richard Green
Ranch Hand
Joined: Aug 25, 2005
Posts: 536
posted
0
that will work. But i dont want to modify the function in my utility class
as this function is used in several places. any other solution? (apart from adding a new fn to the utility class that does the same check except that it returns "" instead of throwing exception).
g madhava
Ranch Hand
Joined: Sep 14, 2001
Posts: 85
posted
0
Change the method which you have in the backing bean to the below.
public Date getEnd() { return someUtiltyClass.checkNotNull(end); }
Adeel Ansari
Ranch Hand
Joined: Aug 15, 2004
Posts: 2874
posted
0
Originally posted by g madhava: Change the method which you have in the backing bean to the below.