date display with possible solution not working
--
<bean:write name="peter" property="tDate" >
Hi I am displaying the dates from database using above tag.
Now the problem is I dont need to display the dates which are sundays
so let me know how to do this
thanxs in advance
possible solution I got as below
Just add a method to your ActionForm like this:
code:
--
public boolean isDateSunday() {if (theDate == null) {return false;}Calendar cal = Calendar.getInstance();cal.setTime(theDate);return(cal.get(Calendar.DAY_OF_WEEK) == Calendar.SUNDAY);}
--
Then in your jsp:
<logic:equal name="peter" property="dateSunday" value="false" >
<bean:write name="peter" property="tDate" >
</logic:equal>
__
but
Actually I am getting dates from database directly .No actionform is involded.
I have access to only jsp page and in that follwoing code
<bean:write name="peter" property="tDate" >
even i tried to put the java code in jsp file but getting error on this line
property="dateSunday" as there is no getter method for this in bean.even though there is getter method for tdate

