Is there a solution to set a "DefaultValue" for the "filterBy" Component ?? I mean more precisely ... How can I set the value of the component shown in the picture ?
http://www.pictureupload.de/originals/pictures/111012170732_primefaces.png
Or how can I set a defaultValue for the option "filtering" in the p:column?!
<p:column id="artikelVerkaufDatum" headerText="Datum" filterBy="#{sales.dateForFilter}"
filterMatchMode="startsWith">
<h:outputText id="date" value="#{sales.datum}">
<f:convertDateTime type="date" pattern="dd.MM.yyyy HH:MM:ss" />
</h:outputText>
</p:column>
Ok ... another question ... My FireBug says that the component exists with ... but i cannot access it with for example: something like FacesContext.getCurrentInstance().getViewRoot().findComponent ... I always get a NullpointerException :(
<th id="artikelVerkauf:datatable:artikelVerkaufDatum" class="ui-state-default ui-filter-column" role="columnheader">
<div class="ui-dt-c">
<span>Datum</span>
<input id="artikelVerkauf:datatable:artikelVerkaufDatum_filter" class="ui-column-filter ui-inputfield ui-inputtext ui-widget ui-state-default ui-corner-all" autocomplete="off" value="" name="artikelVerkauf:datatable:artikelVerkaufDatum_filter" role="textbox" aria-disabled="false" aria-readonly="false" aria-multiline="false">
</div>
</th>
If anybody has any idea ... please let me know ! every help is welcomed :) Regards Sway
This is a solution I used once (PF 3.5):
Then insert the following JavaScript which will be executed after the DOM is ready:
$( document ).ready(function() { $('.my-column-filter').val('default'); tableWidget.filter(); });Good luck!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With