View Single Post
  #1 (permalink)  
Old October 9th, 2008, 12:23 AM
rajesh_css rajesh_css is offline
Authorized User
 
Join Date: Sep 2008
Location: , , Singapore.
Posts: 87
Thanks: 1
Thanked 0 Times in 0 Posts
Default dynamic display using logic tags

hi,
my jsp contains this logic:equal ,i want to make this dynamic based on the years which i get from the database.


<logic:equal value="year" property="years" name="announcementListForm">
            <Table style="year-button-archive" width="60%" >
                <tr>
                    <td class="gold" >
                        <a title="year">By Year:</a>
                    <td class="gold">
                        <a id = "2008" title="2008" href="../announcementList.do?year=2008">
                        2008
                        </a>&nbsp; | &nbsp;</td>
                    <td class="gold">
                        <a id = "2007" title="2007" href="../announcementList.do?year=2007">2007 </a>&nbsp; | &nbsp;
                    </td>
                    <td class="gold">
                        <a id = "2006" title="2006" href="../announcementList.do?year=2006">2006</a>&nbsp; | &nbsp;
                    </td>
                    <td class="gold">
                        <a id = "2005"title="2005" href="../announcementList.do?year=2005">2005 </a>&nbsp; | &nbsp;
                    </td >
                    <td class="gold">
                        <a id = "all" title="All" href="../announcementList.do?year=all">All </a>
                    </td>
                    </tr>
            </Table>
    </logic:equal>



if i get 2008,2006 i should display only 2008,2006 and all

<logic:equal value="year" property="years" name="announcementListForm">
            <Table style="year-button-archive" width="60%" >
                <tr>
                    <td class="gold" >
                        <a title="year">By Year:</a>
                    <td class="gold">
                        <a id = "2008" title="2008" href="../announcementList.do?year=2008">
                        2008
                        </a>&nbsp; | &nbsp;</td>

                    <td class="gold">
                        <a id = "2006" title="2006" href="../announcementList.do?year=2006">2006</a>&nbsp; | &nbsp;
                    </td>

                    <td class="gold">
                        <a id = "all" title="All" href="../announcementList.do?year=all">All </a>
                    </td>
                    </tr>
            </Table>
    </logic:equal>


how to make this dynamic based on the collection of years i get .

Thanks in advance
Raj


Reply With Quote