Boa tarde, estou tentando migrar para JSF2, usando JBoss 5, Eclipse Helios, Hibernate, ainda aprendendo ok, rsrsrs, bom o fato é que minha página teste carrega os grupos tudo ok, usando os componentes do primefaces 2.1, tenho o seguinte problema, o dialog abre corretamente, carrega os dados tudo, porém ele bloqueia tudo, não permite alterar o registro, acho que estou errando nas tags:
Grupos.xhtml
Template.xhtml
Obs.: Notei que quando altero a tag <h:form id=“formGru”> antes da <p:dialog header=“Cadastro de grupos” widgetVar=“dialogGrupos”
resizable=“false” modal=“true” showEffect=“slide” width=“500”> ele libera para alterar, porém não carrega o registro correto, sempre carrega o anterior!
Alguém notou algum erro de tags, enfim podem me auxiliar?
Cara conseguiu resolver o problema? Estou enfrentando esse mesmo problema na minha aplicação.
C
cesarpir
Amigo desculpe por tanto tempo né, é que são tantos erros que desisti um pouco do Java, bom o código ficou assim:
<?xml version="1.0" encoding="ISO-8859-1"?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><ui:compositiontemplate="cadastro.xhtml"xmlns:ui="http://java.sun.com/jsf/facelets"xmlns:h="http://java.sun.com/jsf/html"xmlns:f="http://java.sun.com/jsf/core"xmlns:a4j="http://richfaces.org/a4j"xmlns:p="http://primefaces.prime.com.tr/ui"xmlns:rich="http://richfaces.org/rich"><ui:definename="principal"><head><title>Manutenção de Cadastro dos Grupos</title><linkhref="#{facesContext.externalContext.requestContextPath}/skin.css"rel="stylesheet"type="text/css"/><p:resources/></head><body><f:view><p:layoutfullPage="true"><p:layoutUnitposition="left"width="200"header="Atividades"resizable="true"closable="true"collapsible="true"><h:formprependId="false"><p:commandLinkvalue="Novo Grupo"action="#{grupoMB.novoGrupo}"update="infoGrupo"oncomplete="dialogGrupos.show()"/></h:form></p:layoutUnit><p:layoutUnitposition="center"><h1>Cadastro dos Grupos dos Produtos</h1><br/><h:formprependId="false"><p:dataTableid="tabela"var="grupo"value="#{grupoMB.grupos}"paginator="true"rows="8"><p:column><f:facetname="header"><h:outputTextvalue="Código"/></f:facet><h:outputTextvalue="#{grupo.id}"/></p:column><p:column><f:facetname="header"><h:outputTextvalue="Nome"/></f:facet><h:outputTextvalue="#{grupo.nome}"/></p:column><p:column><f:facetname="header"><h:outputTextvalue="Alterar"/></f:facet><p:commandButtonaction="#{grupoMB.editarGrupo}"value="Alterar"update="infoGrupo"oncomplete="dialogGrupos.show()"/></p:column><p:column><f:facetname="header"><h:outputTextvalue="Excluir"/></f:facet><p:commandButtonaction="#{grupoMB.excluirGrupo}"value="Excluir"update="infoGrupo"/></p:column></p:dataTable></h:form></p:layoutUnit></p:layout><p:dialogheader="Cadastro do Grupo"widgetVar="dialogGrupos"resizable="false"modal="true"showEffect="slide"width="500"><h:formprependId="false"><h:panelGridid="infoGrupo"columns="2"style="margin-bottom:10px"><h:outputLabelfor="titulo"value="Nome:"/><h:inputTextid="titulo"value="#{grupoMB.grupo.nome}"/><p:commandButtonupdate="tabela"oncomplete="dialogGrupos.hide();"action="#{grupoMB.salvarGrupo}"value="Confirmar"/><p:commandButtonupdate="tabela"oncomplete="dialogGrupos.hide();"value="Fechar"/></h:panelGrid></h:form></p:dialog></f:view></body></ui:define></ui:composition>