I posted an enhancement recently [1] which does something very similar
to what you describe here. My goal was to remove the requirement for
writing ${form.map.property} instead of just ${form.property} in JSPs,
so my code (which you can see on the Bugzilla ticket) dynamically
generates the interface as well as its implementation.
There were no objections raised to that enhancement at the time, which
also adds a CGLIB dependency. If you can post your code somewhere (maybe
on another Bugzilla ticket and link it to this one?) I'll take a look
and see if the two changes make sense to combine.
L.
[1] http://issues.apache.org/bugzilla/show_bug.cgi?id=36794
Ryan Stewart wrote:
Hello all. I'm new to this list but not so new to Struts. What do you think
of adding to Struts the ability to configure dynamic form beans to implement
an interface? The main benefit that I see is that it allows further decoupling
of business code from Struts in that DynaActionForms (any action forms,
really) can implement a business interface and be passed by interface to
a business class, and that business class has no dependency on Struts. I've
already implemented it myself, though it's not very thoroughly tested. It's
a surprisingly small amount of code: I subclassed org.apache.struts.config.
FormBeanConfig and wrote one other supporting class. If this were implemented
in Struts, there would be no need for the subclass. The code could just
be integrated directly into FormBeanConfig. The downside is that it would
introduce a dependency on CGLib (but only at build time and when the feature
is actually used) unless there's another way to dynamically apply the interface
of which I am not aware. On the bright side, anyone using Hibernate with
Struts probably is using CGLib anyway. So is anyone interested?
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]