I think you cann't expect Struts 2 to automatically remove an object just because one of it's properties is set to null. Ok, in your case it's the id-property but struts 2 (or better OGNL) doesn't know that. So i don't think this is worth a feature request. But here is the workaround i'd use: use the prepare-Interceptor after params and set group to null if the ID is null in the prepare method. That way the execute method stays a simple "persist( user );return SUCCESS;".
/Stephan > <s:select label="Group" headerKey="" > headerValue="-- None --" > name="user.group.id" > value="%{user.group.id}" > list="%{#groupAction.list}" > listKey="id" listValue="name" > /> > > > Does anyone know if this can be done? Can I configure struts to set > user.group as null rather than create an empty Group object if no > id/value has been specified in the drop down select box? > > Is this something that is working as desired, and I'm the one who needs > to change? Or does struts maybe needs a new feature request in jira? -- Ist Ihr Browser Vista-kompatibel? Jetzt die neuesten Browser-Versionen downloaden: http://www.gmx.net/de/go/browser --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]