The current check APEX is doing when a button is pressed which will discard the changes done in the form (eg Previous/Next), doesn't detect
-) changes done in a tabular form
-) has a bug when
1) the user clicks submit and an error occurs.
2) The error gets displayed on the error page.
3) If the user clicks "ok" the browser is redirected
back to the calling page.
4) This will trigger a re-initialization of the
JavaScript variables => APEX will loose it's
change flag
5) Click Previous/Next => APEX will not warn that
changes are lost.