[jboss-user] [JBoss Seam] - Re: Prevent binding of attributes during update phase
mreuvers
do-not-reply at jboss.com
Sun Jul 8 04:42:34 EDT 2007
Hi Norman,
The most simple example is where users track which entity they are editing, by using a hidden field containing the id (I've seen it a lot in this forum too).
A little javascript on the onSubmit() on the form would be enough then: e.g:
document.getElementById('formName:id').value='-100' for instance. If the id does not exist it usually becomes an insert, if it exists it becomes an edit of a different entity. Of course depending on the handling code.
But your answer already implied enough, just use a conversation scope and you are safe (no need for the id then). In any other technique (non-jsf) there was the problem I described, and there were solutions for it (e.g. spring had its binding.setAllowedFields(), adf defines which properties can be updated in its bindings xml etc.). So I automatically searched for a solution for a problem that wasn't there. =)
Martijn
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4061664#4061664
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4061664
More information about the jboss-user
mailing list