> > The case is really similar to dataobjects. In fact I think it's more
> > correct to generate an ActionForm by deriving it from the generated
> > dataobject.
>
> you mean generate an ActionForm class that extends the ABCData
> class? afaik action types must extend the struts Action class, so we
cant
> do that, which is why I have structured it as I have. on the other
hand
> if you mean have the dataobject extend the ActionForm class (which I
> doubt) then we are binding a bit tight aren't we.
I forgot that ActionForm is a class, what a dumb design :-)
We can apply adapter pattern for this case. I mostly use dataobjects in
my jsp taglibs, even as rows in my listing views, also for validation.
Actionform stuff seems logical to me. I should be able to pass the
actionform stuff on to the ejb layer provided it's a dataobject also,
it's also logical to have simple validation logic in
dataobject/actionform. Adapter pattern seem to be the solution, a
delegate to the dataobject, a getDataObject method.
> > But how to handle the validate method? I think the answer is
> > a separate Validator object that operates on this ActionForm, more
in
> > par with javabeans' propertylistener/etc, and it can be used by both
web
> > tier and ejb tier.
>
> to be honest I haven't worked with javabeans much, but think I can
figure
> out what you're talking about anyway. essentially have a validate
method
> that utilizes propertylisteners for its validation. The other thing
there
> is that the validate method returns an ActionErrors type, so I'm not
sure
> how the propertylisteners PropertyVetoExceptions (that is what they
fire
> isn't it?) would generate ActionError objects - as the latter are
normally
> constructed based on an application resources file.
I guess we can catch Veto exceptions, they have a message as usual, we
can add the message to actionerros. I'm not sure; someone should give it
a try.
Ara.
_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com
_______________________________________________
Xdoclet-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/xdoclet-devel