M
Mike Nishizawa
Since most of the threads on this subject deal with how to basically
get around dynamic casting, maybe you guys can help me get around
this.
My structure is this, I have a GenericBean() class and several
SpecificBean() classes. Each of the SpecificBean() classes has
different methods and does not generally override the methods it
inherits from GenericBean(). My problem is this, I am trying NOT to
have to specifically cast the beans for each specific case. The
application flows as such:
Homepage -> menuitem calls a specific form -> the form is prepared by
a java class in which the bean that the form will use is assigned and
put on the request -> form is presented to the user.
Right now, step 3 has to have a new class created every time we add a
new form. I would like to make this 1 class which can take a class
name as an argument and instantiate the right bean. Obviously, just
calling methods from the classes will not work because the bean object
needs to go on the request.
Thanks for your help!
get around dynamic casting, maybe you guys can help me get around
this.
My structure is this, I have a GenericBean() class and several
SpecificBean() classes. Each of the SpecificBean() classes has
different methods and does not generally override the methods it
inherits from GenericBean(). My problem is this, I am trying NOT to
have to specifically cast the beans for each specific case. The
application flows as such:
Homepage -> menuitem calls a specific form -> the form is prepared by
a java class in which the bean that the form will use is assigned and
put on the request -> form is presented to the user.
Right now, step 3 has to have a new class created every time we add a
new form. I would like to make this 1 class which can take a class
name as an argument and instantiate the right bean. Obviously, just
calling methods from the classes will not work because the bean object
needs to go on the request.
Thanks for your help!