Skip to content

Why primefaces ajax rowSelect event oncomplete method argument id is empty? #2765

Closed Answered by melloware
ChenYouRen asked this question in PrimeFaces
Discussion options

You must be logged in to vote

@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 table render. So if you were expecting that to come back in the oncomplete 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

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@ChenYouRen
Comment options

Answer selected by melloware
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
2 participants