Ola bom dia, criei um componete generico para exclusao de registros usando facelets, porem o bendito nao seta os dados no bean, ele e composto por um modalPanel que contem um botao delete um sair e um textArea para o usuario informar o motivo da exclusao, os dados da textArea nunca sao setados no bean, alguem pode me ajudar?
Vejam meu codigo:
<ui:define name="conteudo">
<h:form id="categoriaForm" binding="#{categoriaMBean.form}">
<a4j:keepAlive beanName="categoriaMBean" />
<h1>Categorias</h1>
...
<rich:dataTable id="categoriaTb" value="#{categoriaMBean.model}"
var="item" rows="10" align="center" width="80%">
...
<rich:column width="40px">
<f:facet name="header">
<h:outputText value="Ações" />
</f:facet>
<a4j:commandLink actionListener="#{categoriaMBean.actionEdit}"
id="qpoedit" reRender="categoriaModalForm" ajaxSingle="true"
immediate="true"
oncomplete="Richfaces.showModalPanel('categoriaModalInclude')">
<h:graphicImage value="/images/_edit.gif" />
</a4j:commandLink>
<sanepar:satangossDeletePanel page="/pages/motivoPanel.xhtml"
mBean="#{categoriaMBean}" reRender="categoriaTb"
actionExcluir="actionDelete" confirmId="categoriaDeletePanel"
msg="Deseja excluir a categoria '#{item.id}' ?" />
</rich:column>
...
The satangos Component
<?xml version="1.0" encoding="ISO-8859-1" ?>
<ui:composition xmlns="http://www.w3.org/1999/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:rich="http://richfaces.org/rich"
xmlns:c="http://java.sun.com/jstl/core">
<a4j:loadScript src="/js/scripts.js" />
<c:if test="#{empty actionExcluir}">
<c:set var="actionExcluir" value="actionExcluir"></c:set>
</c:if>
<c:if test="#{empty confirmId}">
<c:set var="confirmId" value="defaultConfirmId"></c:set>
</c:if>
<c:if test="#{empty disabled}">
<c:set var="disable" value="false"></c:set>
</c:if>
<c:if test="#{empty msg}">
<c:set var="msg" value="Deseja excluir o item?"></c:set>
</c:if>
<c:if test="#{empty rendered}">
<c:set var="rendered" value="true"></c:set>
</c:if>
<c:set var="otherBean" value="#{mBean}"></c:set>
<c:if test="#{empty actionPrepareData}">
<c:set var="actionPrepareData" value="addNullActionlistener"></c:set>
<c:set var="otherBean" value="#{mBean}"></c:set>
</c:if>
<a4j:commandButton
oncomplete="#{rich:component(sanepar:concat(confirmId,'confirmation'))}.show();return false"
ajaxSingle="true" image="/images/_del.gif" immediate="true" disabled="#{disabled}"
rendered="#{rendered}" style="border: none;" actionListener="#{otherBean[actionPrepareData]}">
</a4j:commandButton>
<rich:modalPanel id="#{confirmId}confirmation" autosized="false"
>
<f:facet name="header">
<h:outputText value="Confirmação" />
</f:facet>
<f:facet name="controls">
<h:panelGroup>
<h:graphicImage value="/images/close.png" id="#{confirmId}link" />
<rich:componentControl for="#{confirmId}confirmation"
attachTo="#{confirmId}link" operation="hide" event="onclick" />
</h:panelGroup>
</f:facet>
<div id="deletePanel">
<p><h:outputText value="#{msg}"/></p>
<c:if test="#{not empty page}">
<ui:include src="#{page}" />
</c:if>
<div id="btns">
<h:commandButton
value="Sim" styleClass="btn" >
<a4j:support event="onclick" actionListener="#{mBean[actionExcluir]}"
oncomplete="closeSatangosDeletePanel('#{confirmId}');" />
</h:commandButton>
<input type="button" value="Não" class="btn"
onclick="#{rich:component(sanepar:concat(confirmId,'confirmation'))}.hide();return false" />
</div>
</div>
</rich:modalPanel>
</ui:composition>
A pagina que contem o textArea incluida com <ui:include dentro do SatangosModal
[/code]
><?xml version="1.0" encoding="ISO-8859-1" ?>
<ui:composition xmlns=“http://www.w3.org/1999/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:rich="http://richfaces.org/rich">
<h5>Motivo:</h5>
<h:inputTextarea value="#{categoriaMBean.motivoExclusao}" rows="6"
id="motivoBox" />
</ui:composition>
[code]
Toda ajuda e bem vinda.
Obrigado