Problem with commandButton in Netbeans

-3

I have a problem ... I do not understand why the buttons do not appear in the view :(

<h:body>
        <h:form id="frmPrincipal">
            <p:dataTable>
                <p:column headerText="Boton1">
                    <p:commandButton value="1"/>                    
                </p:column>
                <p:column headerText="Boton2">
                    <p:commandButton value="2"/>
                </p:column>
            </p:dataTable>
        </h:form>

    </h:body>
    
asked by María Guadalupe León Ruiz 23.01.2017 в 02:24
source

2 answers

1

A correct way to leave your code without p: datatable would be:

<p:layout>
    <p:layoutUnit position="west">
        <p:commandButton value="1"/>
    </p:layoutUnit>

    <p:layoutUnit position="right">
        <p:commandButton value="2"/>
    </p:layoutUnit>
</p:layout>

You can use the size, min-width, min-height, style properties of p: layout and p: layoutUnit to design according to your needs.

    
answered by 23.01.2017 в 08:47
0

Try inserting the buttons with this code:

 <button type="button">Click Me!</button> 
    
answered by 23.01.2017 в 08:52