Struts help needed in Increasing the width of the options tag

Hi,
I wanted to display the options tag with three values parted by speces. Here is my jsp
<html:select property="selReleaseId" name="planForm">
                  <html:option value="" >First                  Second                     Third </html:option>
                  <html:optionsCollection name="planningForm" property="ftaRelease" value="respectiveId" label="label"/>  
               </html:select>
I wanted it to show exactly with first after some spaces then second and then third. Also I tried creating the lavel by appending same values and spaces but it is still removing the spaces and showing. Can any one help me to fix this..

Thanks
Json
json123Asked:
Who is Participating?
 
boonlengConnect With a Mentor Commented:
You can set the attribute "filter" to false to disable url encoding.
Example:
<html:optionsCollection ... filter="false"/>  
0
 
boonlengCommented:
Use non-breaking space to avoid browser removing leading/trailing white space.
Example:
<html:option value="">First &nbsp;&nbsp;&nbsp;&nbsp; Second &nbsp;&nbsp;&nbsp;&nbsp; Third</html:option>

Regards,
Boon Leng
0
 
json123Author Commented:
Hi Boon Leng,
I tried that but it is showing in the drop down as &nbps; itself. IT is showing exactly like  First &nbsp;&nbsp;&nbsp;&nbsp; Second &nbsp;&nbsp;&nbsp;&nbsp; Third  . It is not substituting the spaces.

Thanks for your replay
Json
0
Cloud Class® Course: Python 3 Fundamentals

This course will teach participants about installing and configuring Python, syntax, importing, statements, types, strings, booleans, files, lists, tuples, comprehensions, functions, and classes.

 
json123Author Commented:
Thanks Boon  It was my fault.....you are right it is working now thanks for the solution.
0
 
json123Author Commented:
header is good now but for the result , I appended all three fields in my bean and tried to adjust the space there, that is where I am getting the &nbsp displayed. I put a method into bean called getLabel and that will append all those First second and third field and display to the Options. But how can I get spaces there. Is there any other way like I could achieve this?  Thanks for all your help
0
 
json123Author Commented:
Thank you so much Boon it worked...
json
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.