Seam 2.3.0 + RichFaces 4.2.3 - <a:ajax> not being triggered
ericktb Jan 10, 2013 3:00 PMHi
I'm creating this discussion because i havent found any problems similar to the one i'm facing. I've searched a lot and could not find a solution. So, my problem is: i have a form with many fields(most of them inputTexts + <s:decorate>), so i'm using <a:ajax event="blur" bypassUpdates="true"> to validate these fields when they lose focus. The problem is that i think the ajax is not being triggered or at least not completing the request. I've put the onbegin and oncomplete attributes in the tag, the first one is called but the second isn't along with the listener. I think i might be doing something wrong.
I'm using JSF 2.1.14 + RichFaces 4.2.3 + Seam 2.3.0
I am putting here only a small part of the code.
<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <ui:composition xmlns="http://www.w3.org/1999/xhtml" xmlns:s="http://jboss.org/schema/seam/taglib" xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html" xmlns:a4j="http://richfaces.org/a4j" xmlns:rich="http://richfaces.org/rich" template="layout/template.xhtml"> <ui:define name="header"> <meta lang="pt" http-equiv="Content-Type" content="text/html; charset=UTF-8" /> </ui:define> <ui:define name="body"> <a4j:status> <f:facet name="start"> <h:graphicImage value="/img/ai.gif" alt="ai" /> </f:facet> </a4j:status> <h:form id="usuario" styleClass="edit"> <rich:panel> <rich:collapsiblePanel header="Info" switchType="client"> <s:decorate id="nomeField" template="layout/edit.xhtml"> <ui:define name="label">Nome</ui:define> <h:outputLabel value="#{usuarioHome.instance.pessoa.nome}" /> <h:inputText id="nome" size="10" maxlength="10" value="#{usuarioHome.instance.pessoa.nome}" required="true"> <a4j:ajax event="blur" onbegin="alert('teste');" oncomplete="alert('test');" render="nomeField" bypassUpdates="true" listener="#{usuarioHome.test()}" /> </h:inputText> </s:decorate> . . . . </rich:panel> </h:form> </ui:define> </ui:composition>
"UsuarioHome" is my EntityHome Class with Conversation scope. The "test" method has only a System.out. I also debugged the code and i see the method is not called.
Thanks for your time,
Erick