You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by sri <sm...@gmail.com> on 2005/10/07 16:34:34 UTC

adding spaces to the select item label

Hi

I have a selectOneListBox with several entries. I need to organize them by
indenting. I have added spaces, but obviously the spaces are ignored. I have
added "&nbsp;" but that was converted to "&amp;nbsp;" when rendered, so that
didn't work either. Is there any way to ESCAPE the html for selectOneListBox
like the escape attribure for an outputLabel.

I am trying to achieve some thing like below in the list box, I can do this
in a static html.


Value Header 1
Value One1
Value Two1
Value Header 2
Value One2
Value Two2
Value SubHeader1
SubValue One
SubValue Two
.....

The follwoing works fine (static html)
<select name="templates" id="templates">
<option value='All'>All</option>
<option value=''>Public</option>
<option value='DonationRequest'>&nbsp;&nbsp;Class of 1999</option>
<option value='SchoolFestival'>&nbsp;&nbsp;Students of Mrs. XYZ</option>
<option value='DeathNotification'>&nbsp;&nbsp;Participants of ABC Sport
Event</option>
<option value=''>Other Queries</option>
<option value=''>&nbsp;&nbsp;BADAMS (My Queries)</option>
<option value='DonationRequest'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Class of
1999</option>
<option value='SchoolFestival'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Students
of Mrs. XYZ</option>
<option
value='DeathNotification'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Participants
of ABC Sport Event</option>
<option value=''>&nbsp;&nbsp;HPOTTER</option>
<option value='DonationRequest'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Class of
1999</option>
<option value='SchoolFestival'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Students
of Mrs. XYZ</option>
<option
value='DeathNotification'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Participants
of ABC Sport Event</option>
<option value=''>&nbsp;&nbsp;JSMITH</option>
<option value='DonationRequest'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Class of
1999</option>
<option value='SchoolFestival'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Students
of Mrs. XYZ</option>
<option
value='DeathNotification'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Participants
of ABC Sport Event</option>
</select>

TIA
Srikanth

Re: adding spaces to the select item label

Posted by sri <sm...@gmail.com>.
Anybody has any ideas ?

On 10/7/05, sri <sm...@gmail.com> wrote:
>
> Hi
>
> I have a selectOneListBox with several entries. I need to organize them by
> indenting. I have added spaces, but obviously the spaces are ignored. I have
> added "&nbsp;" but that was converted to "&amp;nbsp;" when rendered, so that
> didn't work either. Is there any way to ESCAPE the html for selectOneListBox
> like the escape attribure for an outputLabel.
>
> I am trying to achieve some thing like below in the list box, I can do
> this in a static html.
>
>
> Value Header 1
> Value One1
> Value Two1
> Value Header 2
> Value One2
> Value Two2
> Value SubHeader1
> SubValue One
> SubValue Two
> .....
>
> The follwoing works fine (static html)
> <select name="templates" id="templates">
> <option value='All'>All</option>
> <option value=''>Public</option>
> <option value='DonationRequest'>&nbsp;&nbsp;Class of 1999</option>
> <option value='SchoolFestival'>&nbsp;&nbsp;Students of Mrs. XYZ</option>
> <option value='DeathNotification'>&nbsp;&nbsp;Participants of ABC Sport
> Event</option>
> <option value=''>Other Queries</option>
> <option value=''>&nbsp;&nbsp;BADAMS (My Queries)</option>
> <option value='DonationRequest'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Class
> of 1999</option>
> <option
> value='SchoolFestival'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Students of Mrs.
> XYZ</option>
> <option
> value='DeathNotification'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Participants
> of ABC Sport Event</option>
> <option value=''>&nbsp;&nbsp;HPOTTER</option>
> <option value='DonationRequest'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Class
> of 1999</option>
> <option
> value='SchoolFestival'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Students of Mrs.
> XYZ</option>
> <option
> value='DeathNotification'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Participants
> of ABC Sport Event</option>
> <option value=''>&nbsp;&nbsp;JSMITH</option>
> <option value='DonationRequest'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Class
> of 1999</option>
> <option
> value='SchoolFestival'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Students of Mrs.
> XYZ</option>
> <option
> value='DeathNotification'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Participants
> of ABC Sport Event</option>
> </select>
>
> TIA
> Srikanth
>