Why primefaces ajax rowSelect event oncomplete method argument id is empty? #2765
-
My code:
How do I fix it? Executable example: |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
@ChenYouRen You want to study this example for how to properly use |
Beta Was this translation helpful? Give feedback.
@ChenYouRen
onComplete
is client side Javascript that executes after the AJAX event returns.#{article.id}
is a JSF EL expression evaluated for each row of the table on tablerender
. So if you were expecting that to come back in theoncomplete
i think you need to take a deeper dive into JSF lifecycle and how things work. What is performed on the server side and what is performed on the client side.You want to study this example for how to properly use
onRowSelect
to get the selected item: https://www.primefaces.org/showcase/ui/data/datatable/crud.xhtml