I'd like to trigger in-cell-editing in a dataTable from a context menu edit command. I'm using primesfaces 3.4.1. I only found examples for editing using p:column/p:rowEditor (which is working fine). Context-menu examples span delete/view only but not editing.
Thanx in advance
hp
Related
The showcase dashboard example doesn't work as expected. When having only a panel in 3rd column in my dashboard when I move it to 2nd Column, then the 3rd column disappears. Then, I am not able to move it back to the 3rd column since it disappeared. I tried looking around in a similar question posted but the solution offered there did work for me. I am using PrimeFaces 6 and copied the showcase example from here https://www.primefaces.org/showcase/ui/panel/dashboard.xhtml
Please help.
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 am developing a project using jsf and primefaces. i need one help that is in using primefaces datatable i want to scroll down each row using up and down arrow keys and also need to check the checkbox using key function.
Is there any options for using keyboard keys and i have used one functionality with delete key and it worked by using hotkey tag I had tried using hotkey bind function with up and down key but it doesn't work
I think there is no feature for arrow keys used in the data table may be you can try for example in image swap in primefaces example. This may help you to carry on ur problem.
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 created a Qt4 Gui application. I have the main window. I put a QStackedWidget and two QPushButtons on the MainWindow's central widget. I am using QtCreator as my IDE.
In the attached image the shown stacked widget has two pages and the two pushButtons 1 and 2 are for navigation to firstPage and SecondPage of the stacked widget respectively.
Problem 1:
When I opened signal/slot editor I selected sender=button1 and signal=clicked, then receiver=stackedWidget and slot=? . It supposed to be setCurrentIndex() but its not listed in the drop down list.
Problem 2:
In the right object panel of QtCreator there is marked the "Denied Symbols". I don't know why those symbols are there? Is there any problem ?
I am attaching the screenshot below. If any more details are required please let me know.
I too am learning QT and QT Designer, and ran into the same problem. A determined search of the Internet revealed several other people with the same question, and no answers. You'd think someone out there would have explained it by now. Sigh.
Anyway, the problem is that the signals sent by the push-buttons don't match the signature of the "setCurrentIndex(int)" slot on the stacked-widget, so "setCurrentIndex(int)" doesn't show up in the menu when one tries to use a push-button "clicked()" signal. That is, "clicked()" has no parameters, and "setCurrentIndex(int)" has a single integer parameter, therefore they have different signatures.
In my project, I was trying to connect menu items to a stacked widget, so that one of the contained widgets would be displayed when the menu item was selected. The menu items only have the "triggered()" signal, there's no "triggered(int)" signal, and QStackedWidget's "setCurrentIndex(int)" slot is expecting a signal that has a single integer parameter in its signature.
In other words, you can't do what you want, directly.
Here's how I solved it in my code. Keep in mind that I'm writing my Qt app in C#, using MonoDevelop (to do C# development under Linux) and Qyoto (which is a C# interface to Qt).
After creating my main window (and assiging it to a variable called "layout"), I did this:
QObject.Connect (layout.someMenuItem, SIGNAL("triggered()"), showSomeView);
This causes my menu item to call the showSomeView() function whenever it's triggered.
I then wrote
public void showSomeView()
{
layout.stackedWidget.SetCurrentWidget(layout.someView);
}
Now it does what I mean!
The solution in your project's language should be similar to this. It's unfortunate that the signal/slot connections have to be set up in code, instead of in QT Designer's GUI, but I don't know how else to do it.