struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joe Hertz <jhe...@patriot.net>
Subject RE: Unhandled Exception in the Validator?
Date Thu, 01 Apr 2004 13:27:49 GMT
Forgot -- To answer your question about needing a class of the appropriate 
type. 

Since they all are subclasses of DynaActionForm, I'd guess not.

I mean, what youre doing is saying, "Construct me a DynaActionForm class with 
the following DynaProperties."

You can call set() and get() on the properties you got when you obtained the 
DynaBean, even if you don't cast the it to it's "real" type. You won't get 
access to any methods specific for this bean, but I suspect you can even mix 
and match: It's probably "legal" to typecast DynaActionForm A into 
DynaActionForm B. Doing so should get you a class with the declared class 
properties and methods for B and the DynaProperties of A.

I suspect this means you don't actually *need* a specific DynaBean subclass 
to exist. In theory, if you always used DynaBeans, you could simply be 
casting the form passed into your actions to "DynaActionForm", and that's all 
you'd need unless you needed specific methods for that particular DynaBean.

Not that I'd recommend doing ANYTHING like this though :-)

And this is why I get no work done :-)

> -----Original Message-----
> From: Joe Hertz [mailto:jhertz@patriot.net] 
> Sent: Thursday, April 01, 2004 8:01 AM
> To: struts-user@jakarta.apache.org
> Subject: RE: Unhandled Exception in the Validator?
> 
> 
> I created a method in my Action subclass that implemented the 
> goodies you'll 
> find here.
> 
http://www.javablogs.com/ViewEntry.jspa?id=128211

Boy This subject is coming up alot! :-)

> -----Original Message-----
> From: Takhar, Sandeep [mailto:Sandeep.Takhar@CIBC.ca]
> Sent: Thursday, April 01, 2004 7:53 AM
> To: Struts Users Mailing List
> Subject: RE: Unhandled Exception in the Validator?
> 
> 
> I am curious, how do you create your dynabean and do you have
> a class for it that you have to create?
> 
> sandeep
> 



---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org




---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message