Hi,
I have quite complex object conversions in my actions. I usually convert
a JSON object to a struts form that I send to an action.
List<TagSet> tagSetList;
Where TagSet has own List of Tags for example.
tagSetList = [{name:'ts1', tags: [{name: t1},{name: t2},{name:
t3}]},{name:'ts1', tags: [{name: t1},{name: t2},{name: t3}]}]
this is then converted to a "form" format.
tagSetList[0].name=ts1&tagSetList[0].tags[0].name=t1&tagSetList[0].tags[1].name=t1&...
and so on.
This works really great however now I have a problem in the update
entities case. If it was only one domain object I could go with and
tagSetId parameter and a prepare method.
However in my scenario I need to intercept when setId() called so I can
load the persistent state first, before applying my changes.
Any ideas how to do this?
I was thinking I could maybe reuse the params interceptor to set only
*.id values, but then I would somehow need to know which objects got id
set, so I can load them.
This all seems very much like a hack. Is there some mechanism to
intercept setting a primary key?
Ideas and suggestions are welcome!
/Andreas
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org