| | |
Disabling text-wrapping for f:selectItem tags
Please support our JSP advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
•
•
Join Date: Mar 2008
Posts: 10
Reputation:
Solved Threads: 0
The example code below produces two radio buttons, side by side, i.e.
O Keywords O All Fields
Without specifying a width for the selectOneRadio component (which I don't think is the best solution because of user controllable font sizes, etc), "All Fields" wraps across two lines to become:
O All
Fields
... which is a blight on my otherwise neat looking page.
In the code below, does anyone know how to force the space in "All Fields" to be non-breaking or how to style the selectOneRadio or selectItem's so that text-wrapping doesn't occur?
I've tried, but without success:
- including "text-wrap: none;" and "white-space: nowrap" in the selectOneRadio's style attribute.
- wrapping the selectOneRadio &/or selectItem's in divs styled to have text-wrap set to none.
- replacing "All Fields" with "All Fields", but that just prints the latter.
I know it's a small issue, but any help would be appreciated. Thanks.
O Keywords O All Fields
Without specifying a width for the selectOneRadio component (which I don't think is the best solution because of user controllable font sizes, etc), "All Fields" wraps across two lines to become:
O All
Fields
... which is a blight on my otherwise neat looking page.
In the code below, does anyone know how to force the space in "All Fields" to be non-breaking or how to style the selectOneRadio or selectItem's so that text-wrapping doesn't occur?
JSP Syntax (Toggle Plain Text)
<h:selectOneRadio disabledClass="selectOneRadio_Disabled" enabledClass="selectOneRadio_Enabled" id="radio1" styleClass="selectOneRadio" value="{searchPageBean.searchCriteria.searchOption}" style="vertical-align: middle; margin: 0px; padding: 0px;"> <f:selectItem itemValue="keywords" itemLabel="Keywords"/> <f:selectItem itemValue="all" itemLabel="All Fields"/> </h:selectOneRadio>
I've tried, but without success:
- including "text-wrap: none;" and "white-space: nowrap" in the selectOneRadio's style attribute.
- wrapping the selectOneRadio &/or selectItem's in divs styled to have text-wrap set to none.
- replacing "All Fields" with "All Fields", but that just prints the latter.
I know it's a small issue, but any help would be appreciated. Thanks.
![]() |
Other Threads in the JSP Forum
- Previous Thread: servlet +tomcat 5.0.28+access database+problems
- Next Thread: retrieving data from database into jsp page
| Thread Tools | Search this Thread |
apache backbutton combobox connection database development directorystructure dynamicpagetitles eclipse frames glassfish imagetodatabse imageupload internet java javaee javascript jsf jsp jsppagetitles levels mvc2 mvcmodel2 network parameters passing ping printinserverinsteadofclient redirect request.getparameter response servlet servletdopost()readxml sessions software ssl state_saving_method stocks sun tomcat tutorial video web





