Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Java > Java Open Source > Struts
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Struts section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old October 8th, 2008, 11:23 PM
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
  #2 (permalink)  
Old December 23rd, 2008, 02:42 AM
Friend of Wrox
 
Join Date: Mar 2007
Location: Hyderabad, A.P., India.
Posts: 373
Thanks: 0
Thanked 1 Time in 1 Post
Default

You can loop through the collection!
__________________
- Rakesh
http://iam-rakesh.blogspot.com
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Looping through a list using logic tags problem aadz5 Struts 3 September 23rd, 2011 03:18 AM
MVC pattern - where does display "logic" go? planoie General .NET 0 September 4th, 2008 07:56 AM
Dynamic Date Display velcrobomb SQL Language 3 April 3rd, 2007 10:10 AM
Question regarding the display of <a> tags in xml tajjyarden XSLT 1 March 21st, 2007 11:54 AM
Mixing Data access logic and business logic polrtex BOOK: Professional Jakarta Struts 0 December 15th, 2003 06:19 PM



All times are GMT -4. The time now is 02:57 PM.


Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.