[prev in list] [next in list] [prev in thread] [next in thread] 

List:       taglibs-user
Subject:    Re: Tag Handler Independent of HTML
From:       "Sloan Seaman" <sloan () sgi ! net>
Date:       2003-03-19 22:07:23
[Download RAW message or body]

put the States array into the page context and then use some sort of
iterator tag to build the options list in the jsp

If you are using Struts you could get the States array into a collection and
use the <logic:iterator> or even <html:options> tags to do what you want to
do in the .jsp itself....

If you are not doing JSP, then you may want to look at Velocity templates...

----- Original Message -----
From: "kal inuganti" <websphear@yahoo.com>
To: <taglibs-user@jakarta.apache.org>
Sent: Wednesday, March 19, 2003 4:46 PM
Subject: Tag Handler Independent of HTML


>
> Hi All,
>
> I am building a "State Option List" and my current implementation has the
US States as a String Array and I build a String using the elements of this
String Array. I use a JspWriter to write this String to the output.
>
> Here is a sample code that appends the array elements to a string buffer -
>
> String s = STATES[i];
>
> stringbuffer.append("<option value=\"");
> stringbuffer.append(s);
> stringbuffer.append("\"");
>
> But, I am embedding HTML in Java. Is there a better way of doing this? Any
suggestions will be greatly appreciated.
>
> Thanks, -k
>
>
>
>
>
> ---------------------------------
> Do you Yahoo!?
> Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your desktop!


---------------------------------------------------------------------
To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: taglibs-user-help@jakarta.apache.org

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic