How to update a line(Row) in datatable? (Primefaces)

Asked

Viewed 542 times

1

Hey, guys? Please, can some Javelin ninja help me with this case? I have a datatable and need to know how to update a single Row after an event, such as a click on a commandButton.

I studied a little about the 'omnifaces' before anyone comment on it here hehe, but unfortunately I could not make it work as in the examples they present, much to the contrary, the one gives a refresh on my full page :(

2 answers

1


Staff I managed to solve the problem! It had no way, it was necessary to use the library of omnifaces (link for anyone who wants to see more http://showcase.omnifaces.org/utils/Ajax).

Rather with the omnifaces he would give a refresh in my entire page, I apparently solved this problem by including Ids in all my datatable components and using only primeface components (before I had some JSF components in the middle). Also of course, I based on the library’s sample codes.

  • thanks, I was having the same problem. .

0

I was in doubt about this update. Is it update in the database? Or just a screen update?

If it is screen update, I believe attribute update solve your problem.

ps.: I haven’t talked more about the attribute, because I don’t know if that’s what you’re looking for.

  • 1

    Opa Luke, sorry for the scarcity of information hehe. When I referred to the update, it is the update on the same screen, more specifically of the Row I selected, I only need to trigger an event that of a refresh in that specific line. I can update the entire datatable after this event, but it causes a lot of slow and needless in my opinion, since I just want to refresh a line! Thanks for the help!!!

  • I forgot to mention it in the previous comment

Browser other questions tagged

You are not signed in. Login or sign up in order to post.