struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <jlha...@cox.net>
Subject RE: Using anchors with logic:iterate tag
Date Fri, 20 Sep 2002 21:27:33 GMT
You set me on the right track.  Thanks!

Jennifer
> 
> From: "Galbreath, Mark" <Galbreath@tessco.com>
> Date: 2002/09/20 Fri PM 12:34:18 EDT
> To: 'Struts Users Mailing List' <struts-user@jakarta.apache.org>
> Subject: RE: Using anchors with logic:iterate tag
> 
> Hmmm...interesting problem....
> 
> I assume by "that part of the list," you mean when a user clicks on "C," the
> first "C" word in the list is the target.
> 
> First, just in case:
> http://developer.netscape.com/docs/manuals/htmlguid/tags7.htm#1227754
> 
> Second,
> Using the HTML anchor tag (as defined above) you would have to program some
> logic in the body of the <logic:iterate> like:
> 
> <%
> String word = "";
> String letter_1 = "";
> String letter_2 = "";
> %>
> <logic:iterate name="alphaTreeSet"
>                property="wordList"
>                type="java.util.SortedSet"
>                id="list"
> 
>   <%
>     word = <bean:write name="list" />;
>     letter_2 = word.substring( 0,1);
>     
>     if( !letter_2.equalsIgnoreCase( letter_1) {
>         out.println( "<a name='" + letter.toUpperCase() + "'>" + word +
> "</a>");
>         letter_1 = letter_2;
>     } else {
>         out.println( word);
>     }
>   %>
> </logic:iterate>
> 
> Not sure if this will work, but it seems reasonable.  Then, in your menu,
> hyperlink the letters to the named anchors.
> 
> Mark
> 
> -----Original Message-----
> From: jlhalbe@cox.net [mailto:jlhalbe@cox.net]
> Sent: Friday, September 20, 2002 11:54 AM
> To: struts-user@jakarta.apache.org
> Subject: Using anchors with logic:iterate tag
> 
> 
> I am printing out a large list that is in alphabetical order using the
> logic:iterate tag.  I want to have alphabet jump menu at the top of the page
> so that when users click on a letter, they will jump to that part of the
> list.  How can I insert anchors into my list when I am using the
> logic:iterate tag?
> 
> Thank,
> Jennifer
> 
> 
> --
> To unsubscribe, e-mail:
> <mailto:struts-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail:
> <mailto:struts-user-help@jakarta.apache.org>
> 
> --
> To unsubscribe, e-mail:   <mailto:struts-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: <mailto:struts-user-help@jakarta.apache.org>
> 
> 


--
To unsubscribe, e-mail:   <mailto:struts-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:struts-user-help@jakarta.apache.org>


Mime
View raw message