2 Replies Latest reply on Aug 11, 2009 5:46 AM by Neerou b

    Number of datamodels in a class

    Neerou b Newbie


      I have to display the dates for a particular month dynamically using datamodels as shown below:

       <td> June</td>
       <a:repeat id="calheader" value="#{calendarHeader}" var="header" rendered="#{not empty calendarHeader}">
       <td><h:outputText value="#{header.leaveDate}" /></td>
       <a:repeat id="requestTable" border="1" var="requests"
       rendered="#{not empty leavesRequestPerEmployee}"
       <table border="1" width="100%">
       <td width="250" bgcolor="" align="justify">
       <h:outputText value="#{requests.employeeName}" />
       <a:repeat value="#{requests.leaves}" var="item" >
       <td width="" bgcolor="#{item.leaveType}" ><rich:toolTip onmouseover="alert('Neerou')">

      The calheader tag is used to display dates for a particular month through the code :
       public void displayCalendarHeader(){
       //Current Month : June
       Calendar cal = new GregorianCalendar(2009, Calendar.JUNE, 1);
       int days = cal.getActualMaximum(Calendar.DAY_OF_MONTH);
       calendarHeader = new ArrayList<LmsLeaveDate>(days);
       for(int i =0 ;i<days; i++){
       LmsLeaveDate header = new LmsLeaveDate();

      The row with dates is not being displayed.
      I doubt because am using 2 datamodels. Is that so?