Ajax call in JSF 2.2 for dynamically created rows in DATATABLE - jsf-2.2

Iam dynamically creating new rows in dataTable by clicking on ADD ROW button in jsf 2.2. I need to do ajax call to particular column. Iam invoking AJAX action method but the values are not passing to backing bean.

Related

ASP.NET Core send nested list from razor view page to controller action is null?

I am trying to send a sub list called OrderItems EditOrderViewModel from a razor view page view page to controller action Post Action method but I always get null for the OrderItem Edit action post method sub list and this picture shows the inspected form fields. any help? note that I am using JQuery Ajax to send the data using form .serialize() method and this is the data that it sends.

How to update backend bean with multiple rows selected in prime faces sheet

I am using primefaces 6.2.3 sheet component. I am trying to update the backing bean when the user selects multiple rows and clicks on context menu. I am not able to retrieve the rows selected in my bean. The primefaces extension example uses JavaScript to remove the rows selected from UI without calling the backing bean.
As #Kukeltje has stated simply use a primefaces p:remoteCommand and you can use that in your Javascript code to executing backing bean methods.

How to read datasource of a Kendo DropDownList only once?

(MVC Razor) So on my page I have a Kendo grid which contains a DropDownList within a certain column. Now I don't want to fill data of my dropdownlist from controller (With Viewbag/ViewData) before the page loads because it would slow it down, but instead I'd like to fill the DropDownList data on user click with a call to a controller function, and call the read method only once(on first click). How would I be able to achieve this goal?
Set autoBind property to false. It will cause that dropdown will not be filled by data before user click on it.
After component is initialized dataBound event is started so you can set readonly in it.
Demo here

How to Update Jquery Data Table

I am using Jquery data table plugin. I was able to display it properly with filtering, sorting and Paging.
But, now the problem is i need to filter the data table rows based on dropdown selection made.
but, i do not have any idea how to do this..I am very new to MVC. So, here i need to send that dropdown selected item as parameter to a server side method and call a method and rebind data to the data table.
I am initially binding data to the data table using for loop and iterating over a datatable
Do i need to use Ajax here..if so how to get the new datatable/data to this view and bind to data table?
Please suggest the way to do..
you use the jquery datatable for this
create function and paste jquery datatable code in there
then call this function on dropdown selection change using jquery.
Tips :jquery datatable code available on net find and use it

Create a Web Grid using Javascript

Can we create a WEB GRID dynamically using JAVASCRIPT ?
I am using MVC 3 and Razor as my view.
On one of my Razor view I have a drop down box what I want is to create a web grid dynamically on selection of a drop down I get the data depending on the value selected from the drop down box.
Please help me on this.
I had to use ajax for this, where I had called a method using ajax and my method (present in the controller) returned a partial view.
My partial view had the grid I needed to show. and in the method (present in the controller) I had passed value from the dropdown box using ajax, and using this value I had queried my database and sent that model to the partial view.

Resources