Ed Griebel wrote:
> If you only need to get predefined variables, you can use Jakarta
> BeanUtils or PropertyUtils on the object. For instance, with a form
> bean ActionForm form:
>
> String val = BeanUtils.getProperty("someProperty");
> Object valAsOriginalClass = PropertyUtils.getProperty("someP
If you only need to get predefined variables, you can use Jakarta
BeanUtils or PropertyUtils on the object. For instance, with a form
bean ActionForm form:
String val = BeanUtils.getProperty("someProperty");
Object valAsOriginalClass = PropertyUtils.getProperty("someProperty");
BeanUtils.setPrope
Gareth Evans wrote:
> You can't do either of these things!
Right.
>
> AFAIK you can't do dynamic casting in java, although in
> java 5 you may be able to utilise the Class.cast method.
I did it another way now:
I try to do the fm's and catch a possible cast-exception. All needed
values are stor
_as_string);
Object obj = classDefinition.newInstance();
classDefinition afc = (obj)fm;
Anil.
-Original Message-
From: Andreas Hartmann [mailto:[EMAIL PROTECTED]
Sent: Wednesday, July 26, 2006 1:47 PM
To: user@struts.apache.org
Subject: dynamic casting in Action class
Hello!
I've go
, 2006 1:47 PM
To: user@struts.apache.org
Subject: dynamic casting in Action class
Hello!
I've got the following problem in an action-class: I dynamically want to
retrieve the ActionForm class, which has been called before the
Action-class.
Statically, I do this with
ActionFormClass afc = (a
Hello!
I've got the following problem in an action-class: I dynamically want to
retrieve the ActionForm class, which has been called before the Action-class.
Statically, I do this with
ActionFormClass afc = (afc)fm;
How is it done dynamically? I've got the String name of the desired
Class-Name
6 matches
Mail list logo