Skip to content

Update a datatable row using the rowKey #3383

Answered by lg900
lg900 asked this question in PrimeFaces
Discussion options

You must be logged in to vote

I couldn't get @Row to work in the java backend, but I managed to get something working - which involves 2 roundtrips and involves embedding all cells within the table within a panelGroup with a particular css class for each row.

For example, the css class might be "row-dynamic-update-{rowId}"

This is the workflow:

Step 1
// Java Backend
receive an event that data has changed and update the data store
extract the primary key from the data and send a message via websocket to the client containing the primary key

Step 2:
// Client frontend in the javascript websocket callback
extract the primary key of the changed data
call a remoteCommand defined in the .xhtml passing the primary key of t…

Replies: 2 comments 3 replies

Comment options

You must be logged in to vote
2 replies
@lg900
Comment options

@melloware
Comment options

Comment options

You must be logged in to vote
1 reply
@melloware
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
Resolution: Workaround Workaround for the issue is found
2 participants