In many cases, I use the page action to set up default data, and to populate lists for dropdowns, etc. I don't want this to be re-executed during the conversation, as this would result in loss of user-entered data (e.g. knowing which item they selected in a DataTable). I've spent time debugging strange behavior, only to realise that the problem was caused by Seam re-triggering the page action (usually the wire() function on the EntityHome).
It's pretty easy fix - just set on-postback to false:
<action execute="#{myEntityHome.wire}" on-postback="false">
This tells Seam not to trigger the function when a form is posted back to the server as a result of actions being executed/validation within the conversation.
No comments:
Post a Comment