Ho un rich:extendedDataTable
e sto usando il filtro di colonna. Voglio che il filtro venga attivato una volta che l'utente ha inserito la chiave "intro", ma in javascript non c'è alcun evento del genere.Colonna Richfaces Filtro: Come attivare un evento sul tasto di introduzione
Voglio farlo perché se uso eventi come onkeyup
ottengo troppe richieste e ho problemi a causa di ciò. Sto usando le interfacce 3.3.0GA e facelets.
Questo è il componente:
<ui:composition>
<a4j:form ajaxSingle="true" requestDelay="700">
<rich:extendedDataTable id="tablePatients" value="#{user.patientsTab.patients}" var="patient" rows="20"
onRowMouseOver="this.style.backgroundColor='#F1F1F1'" onRowMouseOut="this.style.backgroundColor='#{a4jSkin.tableBackgroundColor}'">
<f:facet name="header">
<h:outputText value="Patient List" />
</f:facet>
<rich:column label="#{msg.id}">
<f:facet name="header">
<h:outputText value="Id" />
</f:facet>
<h:outputText value="#{patient.id}" id="patientId" />
</rich:column>
<rich:column label="#{msg.name}" sortable="true" filterBy="#{patient.profile.name}" filterEvent="onkeyup">
<f:facet name="header">
<h:outputText value="Name" />
</f:facet>
<h:outputText value="#{patient.profile.name}" id="name" style="#{patient.isUnrated? 'font-weight:bold':''}" />
</rich:column >
<rich:column label="#{msg.lastexamination}" sortable="true">
<f:facet name="header">
<h:outputText value="Last Examination" />
</f:facet>
<h:outputText value="#{patient.lastExaminationDate}" style="#{patient.isUnrated? 'font-weight:bold':''}" />
</rich:column>
<rich:column label="#{msg.action}">
<f:facet name="header">
<h:outputText value="#{msg.action}"></h:outputText></f:facet>
<a4j:commandLink id="editlink" oncomplete="#{rich:component('patientPanel')}.show()" reRender="a4jPatientPanel">
<h:graphicImage value="/images/icons/PNG-24/Add.png" style="border:0" />
<f:setPropertyActionListener value="#{patient}" target="#{user.patientsTab.patientPanel.patient}" />
</a4j:commandLink>
<rich:toolTip for="editlink" value="Edit" />
</rich:column>
<f:facet name="footer">
<rich:datascroller renderIfSinglePage="false" maxPages="5" />
</f:facet>
</rich:extendedDataTable>
</a4j:form>
<ui:include src="/pages/panels/patientPanel.xhtml" />
</ui:composition>
Mmmm L'ho provato e non funziona. Premo invio e non succede nulla. Se clicco fuori dal campo di input (onblur), filtra. Ho provato con extendedDataTable e con dataTable. Stesso risultato – pakore
c'è un modo per ritardare la richiesta? apparentemente "requestDelay" in "a4j: form" non sta ritardando ... Grazie per la risposta però. – pakore
non pronto all'uso. Ma potrebbe esserci qualche soluzione. Ci penserò. – Bozho