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.setProperty("someProperty", somePropertyValue); -ed On 7/26/06, Andreas Hartmann <[EMAIL PROTECTED]> wrote:
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 stored in predefined variables. Thanks for your help, kind regards, Andreas Hartmann --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]