5.2
5.3
6.0.RC3
Code: Select all
<style>
.aCol1 {
text-align: right;
width: 40%;
}
.aCol2 {
text-align: left;
width: 60%;
}
</style>
<h:form id="form" >
<p:panel style="width: 30%;"
header="SelectOneMenu width test - PrimeFaces 5.3">
<h:panelGrid columns="2" width="100%" cellspacing="5"
columnClasses="aCol1,aCol2">
<p:outputLabel value="Sth1"/>
<p:commandButton type="button" value="Test1" style="width: 100%"/>
<p:outputLabel value="Sth2"/>
<p:commandButton type="button" value="Test2" style="width: 100%"/>
<p:outputLabel value="Sth3"/>
<p:selectOneMenu value="#{someBean.propertyVal}"
style="width: 100%">
<f:selectItem noSelectionOption="true" itemLabel="" itemValue=""/>
<f:selectItem itemLabel="val1" itemValue="val1"/>
<f:selectItem itemLabel="val2" itemValue="val2"/>
</p:selectOneMenu>
<p:outputLabel value="Sth4"/>
<p:commandButton type="button" value="Test3" style="width: 100%"/>
</h:panelGrid>
<p:separator/>
</p:panel>
</h:form>