Ryan Stewart wrote:
----Original Message----
From: [EMAIL PROTECTED]
Date: Nov 13, 2005 5:58:15 AM
To: dev@struts.apache.org
Subj: DynaActionForm enhancement

I've just committed my proposed enhancement for DynaActionForm, described in #36794 [1], together with documentation updates to reflect the changes. I'd like to extend this to include Ryan Stewart's enhancement for allowing dyna forms to dynamically implement a configurable interface, as described in #37301 [2], but with a slight useability improvement: I'd like to allow the interface to be specified with an 'interface' attribute rather than via set-property, as in

  <form-bean name="..." type="...Dyna..." inferface="...Foo">

Obviously that'd require a DTD change. I believe the consensus is that this isn't a problem, but I wanted to check before I go ahead.

Ryan presented a good use case to justify the enhancement in #37301, but to further sweeten the deal, consider that this could potentially allow you to access properties on dyan forms with regular getFoo / setFoo methods simply by writing (or generating) an interface ;-)

L.

[1] http://issues.apache.org/bugzilla/show_bug.cgi?id=36794
[2] http://issues.apache.org/bugzilla/show_bug.cgi?id=37301



Greetings again. Sorry I haven't commented on this before. Been pretty busy, and I'll be gone next week, too. Are you planning to add the "interface" attribute still? I don't see it anywhere right now. That was actually the route I was planning to propose. The code I wrote was just what was necessary to be as unintrusive as possible and easily plugged in to an existing Struts 1.2.7 or earlier project. I thought I had a couple other suggestions on your code, but in reading through it, they've gone away. So have you had any further thoughts on how my changes might be integrated with yours?

Ryan, sorry I haven't commented on this; I was planning on adding the feature after I committed my original changes, but there were some concerns raised which I needed to address first. Ted is in the process of wrapping a 1.3.0 release now, so I figured it might be wise to hold off on further changes until that's done.

I looked at your code and, as you say, it's pretty unobtrusive. I'd probably make it a little less conservative, allowing it to implement any property getters or setters the interface specifies. But I'm thinking about a slightly different approach that would provide even more flexibility.

As you probably saw, I added an 'enhanced' attribute to form-property element to turn on the behaviour I introduced. What I'm thinking of is to provide a 'factory' attribute instead, which would specify a class implementing a createFormBean()-type method and making Struts delegate to that if specified.

It would then be really easy to build extensions like these and plug them in as a factory.

L.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to