Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?xml version="1.0" encoding="ISO-8859-1" ?>
- <html xmlns="http://www.w3.org/1999/xhtml"
- xmlns:h="http://java.sun.com/jsf/html"
- xmlns:f="http://java.sun.com/jsf/core"
- xmlns:p="http://primefaces.org/ui">
- <h:head>
- <title>Cadastra Produto</title>
- <h:outputStylesheet library="css" name="styles.css"/>
- </h:head>
- <h:body>
- <h:form id="cadprod">
- <p:panel header="Cadastro de Produto" id="panel">
- <p:focus context="panel"/>
- <p:panelGrid columns="2" styleClass="centerPanelGrid" id="pgrid">
- <p:outputLabel value="Descrição:" for="descricao" />
- <p:inputText id="descricao" value="#{produtoBean.produto.descricao}" />
- <p:outputLabel value="Preço" for="preco" />
- <p:inputText id="preco" value="#{produtoBean.produto.preco}">
- <f:convertNumber groupingUsed="true" maxFractionDigits="2" />
- </p:inputText>
- <p:commandButton value="Salva" action="#{produtoBean.salva}"
- update="growl,pgrid"
- icon="ui-icon-disk"
- oncomplete="$(function(){PrimeFaces.focus('cadprod:descricao');});">
- <p:confirm header="Confirmação" message="Tem certeza ?"
- icon="ui-icon-alert" />
- </p:commandButton>
- <p:commandButton value="Lista" action="listaProdutos_pag"
- icon="ui-icon-search"/>
- </p:panelGrid>
- </p:panel>
- <p:confirmDialog global="true" showEffect="fade" hideEffect="explode">
- <p:commandButton value="Sim" type="button"
- styleClass="ui-confirmdialog-yes" icon="ui-icon-check" />
- <p:commandButton value="Não" type="button"
- styleClass="ui-confirmdialog-no" icon="ui-icon-close" />
- </p:confirmDialog>
- <p:growl id="growl" showSummary="true" showDetail="true"
- sticky="false" life="3000"/>
- </h:form>
- </h:body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement