Bom Dia pessoal, intalei o netbeans 7.0 e o glassfish 3.1, agora executo minha aplicação e aparece esses erros:
na pagina:
The button/link/text component needs to have a Form in its ancestry. Please add .The button/link/text component needs to have a Form in its ancestry. Please add .
no netbeans:
AVISO: PWC4011: Unable to set request character encoding to UTF-8 from context /SISC, because request parameters have already been read, or ServletRequest.getReader() has already been called
Xhtml:
<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:p="http://primefaces.prime.com.tr/ui"
xmlns:f="http://java.sun.com/jsf/core">
<h:head>
<title>Gerar Pedido de Compra</title>
<link type="text/css" rel="stylesheet" href="css/skin.css"/>
</h:head>
<h:body>
<p:layout fullPage="true">
<p:layoutUnit position="top" height="90" resizable="true" style="position: relative; text-align: center">
<h:form>
<h:outputText value="Pedido de compra" style="font-family: Tahoma; font-size: 30px; font-style: bold" />
<h:panelGrid columns="2" style="margin-left: 45%;text-align: center">
<h:outputText value="NUMERO" style="font-family: Tahoma; font-size: 15px; font-style: bold" />
<h:outputText value="DATA" style="font-family: Tahoma; font-size: 15px; font-style: bold" />
<h:outputText value="01/#{genSerialView.ano}" style="font-family: Tahoma; font-size: 12px; font-style: bold" />
<h:outputText value="#{genSerialView.data}" style="font-family: Tahoma; font-size: 12px; font-style: bold" />
</h:panelGrid>
</h:form>
</p:layoutUnit>
<p:layoutUnit position="left" width="100" header="" resizable="true" collapsible="true" maxWidth="100" style="text-align: center">
<h:form>
<p:menu>
<p:submenu label="Menu ->">
<p:menuitem value="Menu01" url="http://localhost:8080/SISC" ajax="false"/>
<p:menuitem value="Menu02" url="#"/>
<p:menuitem value="Menu03" url="#"/>
</p:submenu>
</p:menu>
<br/>
<h:graphicImage value="img/logo.PNG"/>
</h:form>
</p:layoutUnit>
<p:layoutUnit position="right" width="200" header="" resizable="true" collapsible="true">
<p:calendar mode="inline"/>
</p:layoutUnit>
<p:layoutUnit position="center" scrollable="true">
<p:ajaxStatus style="width:16px;height:16px;">
<f:facet name="start">
<h:graphicImage value="img/ajaxloading.gif" />
</f:facet>
<f:facet name="complete">
<h:outputText value="" />
</f:facet>
</p:ajaxStatus>
<div align="">
<h:form id="idid">
<p:panel id="teste" header="Autorização / Fornecedor" toggleable="true" toggleSpeed="200">
<h:panelGrid columns="2">
<h:outputText value="Referente Autorização Nº:" style="font-family: Tahoma; font-size: 11px; font-style: bold" />
<h:selectOneMenu value="#{itensBean.itens}"><f:selectItems value="#{itensBean.itens}"/></h:selectOneMenu>
<h:outputText value="Fornecedor:" style="font-family: Tahoma; font-size: 11px; font-style: bold" />
<h:selectOneMenu value="#{itensBean.itens}"><f:selectItems value="#{itensBean.itens}"/></h:selectOneMenu>
</h:panelGrid>
</p:panel>
<p:panel header="Forma de pagamento" id="forma_pagamento" toggleable="true" toggleSpeed="200">
<h:panelGrid columns="2">
<h:outputText value="A Vista" style="font-family: Tahoma; font-size: 11px; font-style: bold"/><h:selectBooleanCheckbox value="#{formaPagamento.avista}"><p:ajax event="change" update="forma_pagamento"/></h:selectBooleanCheckbox>
<h:outputText value="Parcelado" style="font-family: Tahoma; font-size: 11px; font-style: bold"/><h:selectBooleanCheckbox value="#{formaPagamento.parcelado}"><p:ajax event="change" update="forma_pagamento"/></h:selectBooleanCheckbox>
</h:panelGrid>
<h:panelGrid columns="2">
<h:outputText value="Quantidade de parcelas :" style="font-family: Tahoma; font-size: 11px; font-style: bold" rendered="#{formaPagamento.parcelado}"/>
<h:inputText id="parc" value="#{formaPagamento.parcelas}" rendered="#{formaPagamento.parcelado}">
<f:convertNumber for="parc" maxIntegerDigits="1" type="number"/>
</h:inputText>
<h:outputText value="Previsão de inicio do pagamento :" style="font-family: Tahoma; font-size: 11px; font-style: bold" rendered="#{formaPagamento.parcelado}"/>
<p:calendar value="#{formaPagamento.dataPagamento}" effect="fade" effectDuration="50" rendered="#{formaPagamento.parcelado}"/>
<h:outputText value="Data de pagamento :" style="font-family: Tahoma; font-size: 11px; font-style: bold" rendered="#{formaPagamento.avista}"/>
<p:calendar value="#{formaPagamento.dataPagamento}" effect="fade" effectDuration="50" rendered="#{formaPagamento.avista}"/>
</h:panelGrid>
</p:panel>
</h:form>
<h:form id="cad">
<p:panel header="Cadastrar novo item" toggleable="true" toggleSpeed="200">
<h:panelGrid id="grid" columns="4" >
<h:outputLabel value="Quantidade : " for="txt_qtd"><p:focus for="txt_qtd" /></h:outputLabel>
<h:inputText id="txt_qtd" value="#{itensBean.item.quantidade}" required="true" requiredMessage="Informe a quantidade do Item !" converterMessage="Use somente NUMEROS na quantidade !"><f:convertNumber for="javax.faces.Double"/></h:inputText>
<h:outputLabel value="Unidade : " for="txt_und" ></h:outputLabel>
<h:inputText id="txt_und" style="text-transform:uppercase" value="#{itensBean.item.und}" required="true" requiredMessage="Informe o tipo de Unidade !" />
<h:outputLabel value="Valor Unitário : " for="txt_valorUn"></h:outputLabel>
<h:inputText id="txt_valorUn" value="#{itensBean.item.valorUn}" required="true" requiredMessage="Informe o valor unitário !" converterMessage="Use somente NUMEROS no valor unitário !"><f:convertNumber for="javax.faces.Double"/></h:inputText>
<h:outputLabel value="Descrição : " for="txt_desc"></h:outputLabel>
<h:inputTextarea id="txt_desc" cols="1" style=" width: 100%; height: 30px;text-transform:uppercase" value="#{itensBean.item.descricao}" required="true" requiredMessage="Informe a descrição do Item !" >
<p:resizable maxWidth="500" maxHeight="40" minHeight="40" minWidth="100" />
</h:inputTextarea>
<p:commandButton update="item:itens,val_total,grid,idid:teste" image="ui-icon ui-icon-disk" value="Cadastrar " action="#{itensBean.save}" >
<p:collector value="#{itensBean.item}" addTo="#{itensBean.itens}" />
</p:commandButton>
<h:column/>
<h:column/>
<h:column>
<p:message for="txt_qtd"/>
<p:message for="txt_und"/>
<p:message for="txt_valorUn"/>
<p:message for="txt_desc"/>
</h:column>
</h:panelGrid>
<p:messages showDetail="true" />
</p:panel>
</h:form>
<h:form id="item">
<p:panel toggleable="true" toggleSpeed="200" id="itens" header="Itens Cadastrados">
<p:dataTable value="#{itensBean.itens}" var="item" emptyMessage="Nenhum item inserido" style="text-align: center">
<p:column>
<f:facet name="header">
<h:outputText value="Quantidade" />
</f:facet>
<p:cellEditor>
<f:facet name="output">
<h:outputText value="#{item.quantidade}"/>
</f:facet>
<f:facet name="input">
<h:inputText value="#{item.quantidade}"> <f:convertNumber for="javax.faces.Double"/></h:inputText>
</f:facet>
</p:cellEditor>
</p:column>
<p:column>
<f:facet name="header">
<h:outputText value="Unidade" />
</f:facet>
<p:cellEditor>
<f:facet name="output">
<h:outputText value="#{item.und}"/>
</f:facet>
<f:facet name="input">
<h:inputText value="#{item.und}"/>
</f:facet>
</p:cellEditor>
</p:column>
<p:column>
<f:facet name="header">
<h:outputText value="Descrição do Produto" />
</f:facet>
<p:cellEditor>
<f:facet name="output">
<h:outputText value="#{item.descricao}" />
</f:facet>
<f:facet name="input">
<h:inputText value="#{item.descricao}"/>
</f:facet>
</p:cellEditor>
</p:column>
<p:column>
<f:facet name="header">
<h:outputText value="Valor Unitátio" />
</f:facet>
<p:cellEditor>
<f:facet name="output">
<h:outputText value="#{item.valorUn}" />
</f:facet>
<f:facet name="input">
<h:inputText value="#{item.valorUn}"> <f:convertNumber type="currency" for="javax.faces.Double"/></h:inputText>
</f:facet>
</p:cellEditor>
</p:column>
<p:column>
<f:facet name="header">
<h:outputText value="Valor Total" />
</f:facet>
<h:outputText value="#{item.valorTotal}" />
</p:column>
<p:column>
<f:facet name="header">
<h:outputText value="Excluir" />
</f:facet>
<p:commandButton image="ui-icon ui-icon-trash" value="Excluir " update="item:itens">
<p:collector value="#{item}" removeFrom="#{itensBean.itens}" />
</p:commandButton>
</p:column>
<p:column headerText="Alterar">
<p:rowEditor />
</p:column>
</p:dataTable>
<br/>
<p:graphicText value=" TOTAL GERAL DO PEDIDO R$ #{itensBean.total}" fontName="Tahoma" fontSize="10" style="margin-right: 80%"/>
</p:panel>
</h:form>
</div>
</p:layoutUnit>
</p:layout>
</h:body>
</html>
P/s: No glassfish anterior estava ok !