struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jon.Ridgway" <Jon.Ridg...@upco.co.uk>
Subject RE: Struts - html:select options Question
Date Tue, 09 Apr 2002 10:59:29 GMT
Hi,

Have you considered using the logic:iterate tag with a HTML <table> inside.
Have a look at the example app provided with Struts. This uses the iterate
tag. This might be a better option than <html:select> in your situation.

Jon.

-----Original Message-----
From: Paladugu, Phani [mailto:Phani.Paladugu@cingular.com] 
Sent: 08 April 2002 19:28
To: 'struts-user@jakarta.apache.org'
Subject: Struts - html:select options Question

Need help Users,

This question is pertaining to html:select tag.
I have a situation where I have to present a table of options where each row
contains three columns of data
to the user. And there may be 100 such rows at any given time. 

Since there is no tag available to present the table directly in struts, I
am using html:select tag by reformatting 
the three rows into a single row and using the html:select tag.

and the code looks as follows.

<html:select property="selectedItem" size="12" tabindex="1">
      <html:options name="gLMaintenanceForm" property="list" />
      </html:select>

where list is a Vector that contains Strings in the form instance
gLMaintenanceForm.

It works fine and displays the resulting in display of one string per each
item.
The only problem is it is squeezing out all the white spaces from the string
that I present to the user.

For Example, If I want to Display "A          B           C"  as one option
in the select list it only displays
                                                "A B C" 

I even tried to use &nbsp; instead of spaces like
"A&nbsp;&nbsp;&nbsp;&nbsp;B&nbsp;&nbsp;&nbsp;&nbsp;C"
it is displaying
"A&nbsp;&nbsp;&nbsp;&nbsp;B&nbsp;&nbsp;&nbsp;&nbsp;C"

If anyone knows the solution to this problem, Please help me out !!!

Thanks
Phani Paladugu


--
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