This content has been marked as final.
Show 3 replies
-
1. Re: Avoid calling actionListener
sergeysmirnov Jun 22, 2007 2:09 PM (in response to jmiguel77)could you provide a code snippet for what you have, please.
-
2. Re: Avoid calling actionListener
jmiguel77 Jun 22, 2007 3:29 PM (in response to jmiguel77)Hi
This would be the thing<rich:dataTable id="modulosDataTable" binding="#{modulosFormasController.modulosDataTable}" value="#{modulosFormasDataManager.modulos}" var="item" cellspacing="0" cellpadding="2" styleClass="cb-rich-table" headerClass="headerCell" columnClasses="headerCell,dataCell,dataCell,dataCell,dataCell,dataCell,dataCell" rowKeyVar="row"> <rich:column id="moduleRowColumn" style="width:20px"> <f:facet name="header"><h:outputText value=" " escape="false"/></f:facet> <a4j:commandLink id="editModuleCommandLink" value="#{row+1}" action="moduleForm" actionListener="#{modulosFormasController.selectRowListener}" /> </rich:column> <rich:column id="moduleNameColumn"> <f:facet name="header"><h:outputText value="Módulo" escape="false"/></f:facet> <h:outputText id="moduleName" value="#{item.nombre}" /> </rich:column> <rich:column id="moduleStateColumn"> <f:facet name="header"><h:outputText value="Estado" escape="false"/></f:facet> <h:outputText id="moduleState" value="#{item.estado}" /> </rich:column> <rich:column id="moduleResponsibleColumn"> <f:facet name="header"><h:outputText value="Responsable" escape="false"/></f:facet> <h:outputText id="moduleResponsible" value="#{item.responsable}" /> </rich:column> <a4j:support id="moduleSelectRowSupport" event="onRowClick" data="#{item.modulo}" actionListener="#{modulosFormasController.selectRowListener}" onsubmit="setSelectedRow(this)" /> </rich:dataTable>
All of this is inside a a4j:form. Before that i tried with a normal h:form but neither way gave me the result i wanted
As you see the table has the a4j:support called moduleSelectRowSupport wich calls the selectRowListener method. Also the a4j:commandLink called editModuleCommandLink calls the same selectRowListener method.
What i need is that when i click in the a4j:commandLink, the listener for the a4j:support gets ignored
Thanks a lot -
3. Re: Avoid calling actionListener
sergeysmirnov Jun 22, 2007 5:09 PM (in response to jmiguel77)I guess it is not an ajax problem, because even without any ajax components you will have two javascript events invoked. This issue should be resolved on the client level.
P.S. I see action="moduleForm" in your code. If you have a navigation rule for it, the whole page will be refreshed instead of partual ajax response. Also, if this rule have no , the memory leak might happen. So, be careful there.