Olá amigos
estou tentando executar isto:
<p:commandButton action="#{bean}" id="simAction1" value="Sim"
ajax="false" process="@this" style="margin-right: 8px"
icon="botaoSim" oncomplete="PF('cd').hide()">
</p:commandButton>
dá o seguinte erro:
ADVERTÊNCIA: #{bean}: javax.el.ELException: /confirm.xhtml @33,50 action="#{bean}": Identity 'bean' does not reference a MethodExpression instance, returned type: java.lang.String
javax.faces.FacesException: #{bean}: javax.el.ELException: /confirm.xhtml @33,50 action="#{bean}": Identity 'bean' does not reference a MethodExpression instance, returned type: java.lang.String
o parâmetro #{bean} vem deste xhtml:
<ui:include src="confirm.xhtml" >
<ui:param name="header" value="#{cadastrarApreensaoForm.header}"/>
<ui:param name="message" value="#{cadastrarApreensaoForm.message}"/>
<ui:param name="bean" value="#{cadastrarApreensaoForm.bean}"/>
<ui:param name="acao" value="#{cadastrarApreensaoForm.action}"/>
</ui:include>
que configuro no form:
public String setarSalvarApreensao() throws IOException {
this.setHeader("Salvar Apreensão");
this.setMessage("Deseja salvar esta apreensão...");
this.setBean("#{cadastrarApreensaoForm.salvarApreensao}");
this.setAction("salvarApreensao");
RequestContext.getCurrentInstance().execute("PF('cd').show()");
return "cadastrarapreensao";
}
Alguém poderia ajudar?
muito obrigado
Silvio Guedes