Note that there are some explanatory texts on larger screens.

plurals
  1. PORichfaces column Filter: How to fire an event on intro key
    primarykey
    data
    text
    <p>I have a <code>rich:extendedDataTable</code> and I am using column filtering. I want the filter to be fired once the user enters the "intro" key, but in javascript there is no such event.</p> <p>I want to do so because if I use events such as <code>onkeyup</code> I get too many requests and I have problems because of that. I'm using richfaces 3.3.0GA and facelets.</p> <p>This is the component:</p> <pre class="lang-xml prettyprint-override"><code>&lt;ui:composition&gt; &lt;a4j:form ajaxSingle="true" requestDelay="700"&gt; &lt;rich:extendedDataTable id="tablePatients" value="#{user.patientsTab.patients}" var="patient" rows="20" onRowMouseOver="this.style.backgroundColor='#F1F1F1'" onRowMouseOut="this.style.backgroundColor='#{a4jSkin.tableBackgroundColor}'"&gt; &lt;f:facet name="header"&gt; &lt;h:outputText value="Patient List" /&gt; &lt;/f:facet&gt; &lt;rich:column label="#{msg.id}"&gt; &lt;f:facet name="header"&gt; &lt;h:outputText value="Id" /&gt; &lt;/f:facet&gt; &lt;h:outputText value="#{patient.id}" id="patientId" /&gt; &lt;/rich:column&gt; &lt;rich:column label="#{msg.name}" sortable="true" filterBy="#{patient.profile.name}" filterEvent="onkeyup"&gt; &lt;f:facet name="header"&gt; &lt;h:outputText value="Name" /&gt; &lt;/f:facet&gt; &lt;h:outputText value="#{patient.profile.name}" id="name" style="#{patient.isUnrated? 'font-weight:bold':''}" /&gt; &lt;/rich:column &gt; &lt;rich:column label="#{msg.lastexamination}" sortable="true"&gt; &lt;f:facet name="header"&gt; &lt;h:outputText value="Last Examination" /&gt; &lt;/f:facet&gt; &lt;h:outputText value="#{patient.lastExaminationDate}" style="#{patient.isUnrated? 'font-weight:bold':''}" /&gt; &lt;/rich:column&gt; &lt;rich:column label="#{msg.action}"&gt; &lt;f:facet name="header"&gt; &lt;h:outputText value="#{msg.action}"&gt;&lt;/h:outputText&gt;&lt;/f:facet&gt; &lt;a4j:commandLink id="editlink" oncomplete="#{rich:component('patientPanel')}.show()" reRender="a4jPatientPanel"&gt; &lt;h:graphicImage value="/images/icons/PNG-24/Add.png" style="border:0" /&gt; &lt;f:setPropertyActionListener value="#{patient}" target="#{user.patientsTab.patientPanel.patient}" /&gt; &lt;/a4j:commandLink&gt; &lt;rich:toolTip for="editlink" value="Edit" /&gt; &lt;/rich:column&gt; &lt;f:facet name="footer"&gt; &lt;rich:datascroller renderIfSinglePage="false" maxPages="5" /&gt; &lt;/f:facet&gt; &lt;/rich:extendedDataTable&gt; &lt;/a4j:form&gt; &lt;ui:include src="/pages/panels/patientPanel.xhtml" /&gt; &lt;/ui:composition&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload