Vaadin lets you build secure, UX-first PWAs entirely in Java.
Free ebook & tutorial.
Live Table Overriding Button Click
I have a table that is constantly updated by that thread on the server side
I also have a poller on the page itself polling a configuarable amount of time.
When the poller polls the server is takes 2 seconds for the poll to complete and the page to recieve the updated table.
The table its self contains a generated column that is a button that will make a window popup with more details about the row you have just clicked.
If you click the button during the 2second refresh then the button click never gets processed and the message never appears.
Any ideas how i can get the message to still display after the refresh?
I am guessing it is because the table may not have the same object after the refresh.
I am back with a little more infomation.
The data container that i am using gets rows added to and removed from sort of like a videprinter. so i add a row at the bottom and remove from the top. I do not create a new container each time.
Does the generated column create a new button each refresh hence the originating button does not exist any more and this is why my click is being ignored.
Is is possible to stop server poll in mid transaction from the client side?
for example the button on the client side button click interupts the 2 second data receive?
I have done a little research around this and generally it is not the vaadin way il ask none the less.
Can you have a client side component that opens a message box that does not call the server?
Looking at your other posts, you are only using one thread; This is normal, and is the standard request/response lifecycle.
However, if your "poll" action takes two seconds, nothing will happen until the "poll" returns - and that includes processing the button click/event.
As far as I know, there's no way to "stop server poll in mid transaction from the client side" - it certainly wouldn't be simple if there were.
I think you'll need to look into using a separate background thread to update the table and use a "push" technique - see https://vaadin.com/forum/-/message_boards/view_message/231271.
Thanks for your response and i was afraid you where going to say that!
however i'm not 100% certain a push system would help either but feel free to correct me if i am wrong.
I have a client that is waiting for a push message from the server
The server receives a messages
The server then notifies me to say i have a message
the client then goes to the server for the messages. (this takes 2 seconds)
a click event occurs
client returns with the message
Wont the click event just be ignored in the same way as the progress indicator?