>>>>> On Thu, 10 Dec 2015 15:33:51 +0100, arjan tijms <arjan.tijms_at_gmail.com> said:
AT> Hi,
AT> In the WholeBeanValidator class I encountered the following method:
AT> private Object copyObjectAndPopulateWithCandidateValues(ValueExpression
AT> beanVE,
Yes, and the key word here is "private".
[...]
AT> As it appears the copy strategy is hard coded here.
Yes, indeed it is.
AT> In the original OmniFaces code I gave the user the option to set the
AT> strategy. The default is to try a number of strategies (as shown here), but
AT> alternatively the user can either choose an explicit existing strategy
AT> (e.g. CopyCtorCopier), or provide a custom strategy.
AT> This is needed in practice, since with the current implementation it's hard
AT> to make a bean that fails the NewInstanceCopier and still be a bean
AT> (actually, isn't this nearly impossible?).
AT> In other words, if the CopyCtorCopier would be more efficient since the
AT> bean had heavy weight dependencies, then this copier is quite hard now to
AT> actually reach.
I'm ok with changing the hard coded strategy, but I feel making the
strategy customizable is too much complexity. Such customizability is
better suited to an extension library rather than being part of the core
spec.
Can you please suggest an alternate private implementation? I'm happy
to have that code rewritten.
Thanks,
Ed
--
| edward.burns_at_oracle.com | office: +1 407 458 0017