Prime ui Datatable Refresh after Ajax Post
-
- Prime
- Posts: 18616
- Joined: 05 Jan 2009, 00:21
- Location: Cybertron
- Contact:
Stay tuned for a little for 1.0.RC, this one and new features for datatable are in progress.
Hi,
To reload the content of the datatable, I call the function sort like this :
Where item_name is the column that I want to be sorted, order : 1 means the sort is to be done in ascending order.
waiting for a better solution, I hope it will be helpful
Pascal,
To reload the content of the datatable, I call the function sort like this :
Code: Select all
// Datatable content update
$('#tb_items').puidatatable('sort',[{field:'item_name', order: 1}]);
waiting for a better solution, I hope it will be helpful
Pascal,
Hi,
PrimeFaces 5.0 takes all the available time of Optimus Prime.
In the mean time, you can also have a look at http://forum.primefaces.org/viewtopic.p ... 29#p115829 for the refresh of the datatable.
regards
Rudy
Not yet.Is there any update for this issue?
PrimeFaces 5.0 takes all the available time of Optimus Prime.
In the mean time, you can also have a look at http://forum.primefaces.org/viewtopic.p ... 29#p115829 for the refresh of the datatable.
regards
Rudy
PrimeFaces version 3.5, Tomcat 7, Mojarra 2.1.13
PrimeFaces version 4.0, Glassfish 4.0
PrimeFaces version 5.0, WLS 12.1.2
If you haven't read the forum rules read them now : viewtopic.php?f=3&t=1194
PrimeFaces version 4.0, Glassfish 4.0
PrimeFaces version 5.0, WLS 12.1.2
If you haven't read the forum rules read them now : viewtopic.php?f=3&t=1194
Thanks, i have already seen this post but i am not sure where i should insert this code.
I have tried to insert it in the declaration of my datatable but this doesnt work.
Could you enlight on this?
I have tried to insert it in the declaration of my datatable but this doesnt work.
Could you enlight on this?
rubus wrote:Hi,
Not yet.Is there any update for this issue?
PrimeFaces 5.0 takes all the available time of Optimus Prime.
In the mean time, you can also have a look at http://forum.primefaces.org/viewtopic.p ... 29#p115829 for the refresh of the datatable.
regards
Rudy
F. Papadopoulos
---
PrimeFaces 4.0 on WAS 8 using MyFaces
---
PrimeFaces 4.0 on WAS 8 using MyFaces
Hi,
You have to insert it into the widget code (datatable.js)
So you have then a customized version of PrimeUI and every time you update with a new release, you have to insert it again (until it is available within PrimeUI itself).
Regards
Rudy
You have to insert it into the widget code (datatable.js)
Code: Select all
$.widget("primeui.puidatatable", {
// rest of PrimeUI code
// Insert code near the end.
}
Regards
Rudy
PrimeFaces version 3.5, Tomcat 7, Mojarra 2.1.13
PrimeFaces version 4.0, Glassfish 4.0
PrimeFaces version 5.0, WLS 12.1.2
If you haven't read the forum rules read them now : viewtopic.php?f=3&t=1194
PrimeFaces version 4.0, Glassfish 4.0
PrimeFaces version 5.0, WLS 12.1.2
If you haven't read the forum rules read them now : viewtopic.php?f=3&t=1194
rubus wrote:Hi,
You have to insert it into the widget code (datatable.js)
So you have then a customized version of PrimeUI and every time you update with a new release, you have to insert it again (until it is available within PrimeUI itself).Code: Select all
$.widget("primeui.puidatatable", { // rest of PrimeUI code // Insert code near the end. }
Regards
Rudy
Thanks!
It seems to work.
F. Papadopoulos
---
PrimeFaces 4.0 on WAS 8 using MyFaces
---
PrimeFaces 4.0 on WAS 8 using MyFaces
have a look at : http://www.pm-consultant.fr/primeui/
-
- Posts: 2
- Joined: 30 Sep 2016, 16:37
Here's what I do to inject into the target :
Code: Select all
var inject_entry = function (container, name, sz_id) {
var pl = $container.find('div.ui-picklist');
var pldata = pl.data('primeuiPuipicklist');
var old_data = [];
pldata.targetList.find('li').each(function() {
old_data.push({
label: $(this).data('item-label'),
value: $(this).data('item-value')
});
});
var new_data=old_data;
new_data.push({label:name,value:sz_id});
pldata._populateInputFromData.call(pldata, pldata.targetList, pldata.options.targetData = new_data);
pldata.targetList.find('li').remove();
pldata.targetInput.empty();
for (var i = 0; i < new_data.length; i++) {
pldata.targetInput.append('<option value="'+new_data[i].value+'">'+new_data[i].label+'</option>');
}
pldata._populateContainerFromOptions.call(pldata, pldata.targetInput, pldata.targetList);
};
var $container = $('#mydivsomewhere');
inject_entry($container, 'new option', 123);
-
- Information
-
Who is online
Users browsing this forum: No registered users and 2 guests