HotKey Invokes Wrong Method
dolos Jun 7, 2010 6:06 PMHi Everybody, I'm new in richfaces and i'm trying to do a datatable with inputtext filters in some column headers, whitout using the richfaces integrated filter function. I want the table to be filtered when the user hits the Enter key, so I'm trying to use rich Hotkeys to do that, but i have a problem and i couldn't find a solution in other threads. The problem is that when Enter key is pressed in the first of two diferent inputText, the hotkey calls the action of the second input Text. Here's a part of the code in my JSP:
<rich:column label="Nombre"> <f:facet name="header"> <h:panelGroup> <div> <h:outputText value="Nombre"/> </div> <br/> <div> <h:inputText value="#{beanUsuario.filtroNomb}" size="15" id="filtroNomb"> <a4j:jsFunction name="filtrarNombre" action="#{beanUsuario.filtroNombre}" reRender="tabla,scroll"/> <rich:hotKey key="return" handler="filtrarNombre()" disableInInput="false" id="hotnomb"/> </h:inputText> </div> </h:panelGroup> </f:facet> <h:outputText id="tnombre" value="#{usuario.nombre}"/> </rich:column> <rich:column headerClass="classA" label="Apellido"> <f:facet name="header"> <h:panelGroup> <div> <h:outputText value="Apellido(s)"/> </div> <br/> <div> <h:inputText value="#{beanUsuario.filtroAp}" size="15" id="filtroAp"> <a4j:jsFunction name="filtrarApellido" action="#{beanUsuario.filtroApellido}" reRender="tabla,scroll"/> <rich:hotKey key="return" handler="filtrarApellido();return false;" disableInInput="false" id="hotap"/> </h:inputText> </div> </h:panelGroup> </f:facet> <h:outputText id="tapellido" value="#{usuario.apellido}"/> </rich:column>
I've also tried to use the selector atribute like selector="#filtroAp" and selector="#filtroNomb" but in this case, no function is called by the hotkey.
Thanks for your help in advance