I use richfaces and thinking about that to add same functions to seam components likeonclick onsubmit oncomplete whitch fire js functions pre and post action.
What you think about that?