I'm trying to implement paginator (or something like these) with accordionPanel in PrimeFaces, There is not a single example present in primefaces demo website,I searched in web as well,Is it possible to implement paginator with accordionPanel?
If you want paginator in accordionPanel then sorry, it's not possible. However if you are trying to implement datatable inside accordionPanel and in that if you want paginator then it's possible. I am pretty sure there is example present of datatable as well as accordionPanel you need to combine them it should work.
Related
I have just started using ngx-formly and added some dynamic controls to a page. I was wondering if there is a way to add sorting and searching functionality on a table dynamically created using angular ngx-formly? Something like the screenshot.
Perhaps a setting to be put into templateOptions inside the FormlyFieldConfig ?- or adding a wrapper? Would appreciate some suggestions.
I have the current code to get a list of item using a picklist in Primefaces:
<p:pickList showSourceFilter="true" showTargetFilter="true" filterMatchMode="contains" label="#{msg.dataview_label_net}" id="pickListNet" converter="firstItemConverter" value="#{dataViewBean.net}" var="node" itemLabel="#{item.name}" itemValue="#{item}" />
But, I have an issue with performance at the Google Chrome to show this list.
My backend is fast, but, to show all item in Primefaces there is a long time to render. Is it possible using some pagination in a picklist or some like lazy load?
I have around 3000 items in my list. I tried a js fix to improve in here:
https://code.google.com/p/primefaces/issues/detail?can=2&start=0&num=100&q=&colspec=ID%20Type%20Status%20Priority%20TargetVersion%20Reporter%20Owner%20Summary&groupby=&sort=&id=7655
but it's not working good for me.
The best solution for this issue is try another component like a DataTable.
I used a DataTable with a multiple checkbox and a lazy scroll to show only a partial list. My time to load reduce from 1min15s to 15s.
No, sorry this is not supported in the versions of PrimeFaces at this time of writing (5.1/5.2-SNAPSHOT). As could have been found out by lookin at the PrimeFaces documentation
i'm using primeng and i've faced the problem of pagination, i bring data from API, by 20 elements each call, the solution was to get the list element UL of the source by className and check if scroll is in the limit, if yes i make a new call of the api with page+1 and concatenate the data
I'm using primefaces. Problem is with SelectOneMenu. Does anyone know if I can, when using filter in SelectOneMenu, remove SelectItemGroups which become empty?
I am using the dataTable component with the paginator in a search utility which works great but having a problem to reset paginator page to the first page.
for example you are on page 6 of the paginator and you perform a new search, the dataTable gets reloaded with the new data but, the page number is not reset to 1 it remains on 6.
I'm using PF 3.4.2.
any idea?
Add the following javascript to the action which updates the DataTable's model:
onclick="myWidgetVar.getPaginator().setPage(0);"
Where myWidgerVar is the WidgetVar for the DataTable.
Ensure that the DataTable has a WidgetVar set. For further context, see this post by Optimus Prime.
The above causes the grid to make a call to refresh data with existing filters. If you explicitly want the grid to load new data from page one, you can reset the datatable on server side
DataTable dataTable = (DataTable) FacesContext.getCurrentInstance().getViewRoot().findComponent("dialogSelectionForm:carSelectDialogTable");
dataTable.reset();
Reference - http://forum.primefaces.org/viewtopic.php?f=3&t=5807
I solved with widgetVarDataTable.clearFilters(); in primefaces 3.5,
and PF('widgetVarDataTable').clearFilters(); in primefaces 5.0
I solved my problem using PF('dataTableWidgetVar').paginator.setPage(0); in Primefaces 6.0
I had to solve this need in the back-end. To solve the problem without executing some sort of "duplicated refresh" I did implement this:
<p:commandButton ... update="dataTable" actionListener="#{myController.bindingDataTable.setFirst(0)}" oncomplete="someClientJS();" ... />
This code assumes the dataTable in the front-end is binding to the back-end reference variable myController.bindingDataTable. The ActionListener executes before the dataTable gets refreshed, so for that moment the paging is set with '0' as value for the first row/record (hence, first page as well).
I have an Angular model ng-model="car" I am trying to create a dropdown list, and would like the list items to be populated from objects in the model. I am trying to do this all in the HTML (since it is Angular).
Any thoughts?
If you want a form input: http://angular-ui.github.com/#/directives-select2
If you want a dropmenu: http://angular-ui.github.com/bootstrap/#/dropdownToggle
Checkout the dropmenu source code too to get an idea of how to go about doing it if you rather code up your own solution.
Essentially AngularJS makes it so easy that the ONLY thing you really need to do is toggle the visibility of a DOM element and use some fancy css.
Checkout this example of using pure AngularJS + AngularUI (when necessary) alongside Bootstrap's CSS to create dropmenus (and other widgets) http://plnkr.co/edit/gist:4464334?p=preview