[
http://www.stripesframework.org/jira/browse/STS-614?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=11647#action_11647
]
Ben Gunter commented on STS-614:
--------------------------------
Since we didn't document this in these comments earlier, I'll do so now. The
preferred way to post-process new objects in Stripes is to implement an
ObjectPostProcessor<T> and drop it into your extensions package. You also still
can extend DefaultObjectFactory and override postProcess(Object), but that is a
little less flexible. DefaultObjectFactory uses the same strategy used by
DefaultFormatterFactory to find a post-processor based on interfaces and
inheritance, which enables you to write, for example, an
ObjectPostProcessor<ActionBean>, drop it in place and not have to worry about
whether the object you're handed is an ActionBean or not.
There are some more advanced cases where you'd need to extend
DefaultObjectFactory, though. One Striper did so to add constructor injection,
which has to be done instead of the no-arg constructor call by
DefaultObjectFactory.
> Ability to specify "ObjectFactory" for beans created during binding
> -------------------------------------------------------------------
>
> Key: STS-614
> URL: http://www.stripesframework.org/jira/browse/STS-614
> Project: Stripes
> Issue Type: New Feature
> Affects Versions: Release 1.5
> Reporter: Patrick Lightbody
> Assignee: Ben Gunter
> Fix For: Release 1.5.1, Release 1.6
>
> Attachments: obj_fact.patch, object_factory_v2.patch
>
>
> See patch.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://www.stripesframework.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
Stripes-development mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/stripes-development