How to break to the end of the line checkBox

1

The courses are going out without formatting, there are more courses and they are not appearing on the registration screen.

HowtobreakthisintoXHTML?

Code:

<h:panelGridcolumns="2" cellpadding="5">
<p:outputLabel value="Cursos" for="cursos" />
                <p:selectManyCheckbox id="cursos" styleClass="many-checkbox" value="#{cadastroCicloBean.ciclo.cursos}" 
                    converter="cursoConverter" required="true" requiredMessage="Por favor, informe a data de Inicio">
                        <f:attribute name="collectionType" value="java.util.ArrayList"/>
                        <f:selectItems value="#{cadastroCicloBean.cursos}" var="curso" itemLabel="#{curso.nome}" itemValue="#{curso}" />
                </p:selectManyCheckbox>     
</h:panelGrid>
    
asked by anonymous 12.11.2015 / 19:25

1 answer

1

You can use the Grid Layout by setting the number of columns or using the responsive layout (also with the number of columns).

<h3>Grid Layout</h3>
<p:selectManyCheckbox id="grid" value="#{checkboxView.selectedCities}" layout="grid" columns="3">
    <f:selectItems value="#{checkboxView.cities}" var="city" itemLabel="#{city}" itemValue="#{city}" />
</p:selectManyCheckbox>

<h3>Responsive (since v5.2.4)</h3>
<p:selectManyCheckbox id="grid2" value="#{checkboxView.selectedCities2}" layout="responsive" columns="3">
    <f:selectItems value="#{checkboxView.cities}" var="city" itemLabel="#{city}" itemValue="#{city}" />
</p:selectManyCheckbox>

Source: Primefaces Showcase

    
12.11.2015 / 19:58