JSF富选择设置组件宽度
简单而干净。。。 我可以为下拉元素设置listWidth,但我不能设置组件宽度,也可以使用内联样式JSF富选择设置组件宽度,jsf,jsf-2,richfaces,width,html-select,Jsf,Jsf 2,Richfaces,Width,Html Select,简单而干净。。。 我可以为下拉元素设置listWidth,但我不能设置组件宽度,也可以使用内联样式 <rich:select enableManualInput="true" clientFilterFunction="customFilter" value="#{listaPrestazioni.filterLiv1}" style="width: 80px;"> <f:selectItems value=
<rich:select
enableManualInput="true"
clientFilterFunction="customFilter"
value="#{listaPrestazioni.filterLiv1}"
style="width: 80px;">
<f:selectItems value="#{listaPrestazioni.liv1List}"/>
<a4j:ajax event="change" render="tab_dettaglio" execute="@this" />
</rich:select>
我希望选择的最大宽度为80px。试试这个
<h:outputStylesheet>
.MarcxSelectStyle input{
width: 80px;
}
</h:outputStylesheet>
<rich:select ... styleClass="MarcxSelectStyle">...</rich:select>
我有这个问题,我的解决方案是使用jsf标签,它似乎为我做了这项工作,无论如何,这可能会帮助一些人:
<h:selectOneListbox id="myListBox" style="width:100%" size="1">
<f:selectItems value="#{MyController.bean.items}" />
</h:selectOneListbox>
如果RichFaces 4.5.0A至少没有在上一版本上测试过,那么这不起作用,您需要使用.MarcxSelectStyle input.rf-sel-inp选择器来覆盖RichFaces CSS。此外,宽度:100%在没有其他更改的情况下将无法工作。