dqt
dqt

Reputation: 65

Primefaces Datatable lost focus

JSF-2.1 Primefaces 3.5 I have a datatable with Filter. I need to update only data on datatable(without Filter). Because everytime when i update the datatable, i lost my focus.

I have one dialog, and the confirm button is outside the datatable's form

and have another question: when i update my datatable, i lost the text in datatable's Filter. How can i fix it

Thanks

Upvotes: 3

Views: 907

Answers (1)

Daniel
Daniel

Reputation: 37061

Try this

place hidden commandButton (style="display:none") inside the h:form of your datatable

then in you confirm button use

onclick="$('#full_id_of_you_new_hidden_button').click(); return false;"

make sure that your new hidden button will do the render/update that your original button was doing...

Upvotes: 1

Related Questions