ok, I have a Table Table_BrassTag this table has a button Save when I click on this button a popup appears, in this popup, I add some data, click on Save on popup another popup opens with a confirm and cancel button when I click on the Confirm button. The data gets saved into the database via a Message Handler (Thanks to @pascal.fragnoud ).
Now I want to refresh the binding of Table_BrassTag how do I achieve it?
Isn't the message handler that does the database operation on the table ?
The whole point of my suggestions in the previous threads was to have the message handler on the table.
edit: Actually I guess you have another table in the first popup ? And you put the handler here ?
Why exactly are there 2 popups ? Shouldn't the first one be enough ?
Exactly.
So, Main View With Table (View A) to be refreshed. Here we have a button it will open a popup (View B), on this popup we have another table that we will use to insert the data, upon inserting and Pressing Confirm, another popup(View C) will open this will have a Confirm and Cancel Button. When We will click on the Confirm button. Data will be saved into the database via message handler on the Popup One (View B). Once data is Saved, this Popup will be closed and after closing of this Popup (View B) user will be redirected to Main View with Table (View A) I want to refresh the binding of this table as this table is showing the data has been inserted from View B.
The message handler should be on View A, all of the updating and everything should be done there. When you are done updating the DB, you call self.refreshBinding('props.data').
IMHO, the second popup is needlessly complicating the UI and will become a headache to the user.
Just put the confirm and cancel buttons on the View B popup. If the confirm button is pressed, you send the message to View A and close the popup. If the cancel button is pressed, you just close View B and nothing else happens. There is no reason for the 2nd popup, which is only adding the number of clicks needed by the user to accomplish their goal.