| Author |
Calling a Action class which doesnt have a Perform() or Execute() method.
|
Shan Krish
Greenhorn
Joined: Oct 12, 2010
Posts: 4
|
|
Hi All ,
I have all my appliaction written in User defined Struts framework. I have my userdefined struts-config file calling a Action class below (whole code),
It calls this class which doesnt have any Perform() or Execute() method and the class extends BatchTypeDetailAction which has Perform() method returns RequestForward . my question is which method from the above BatchChildDetailAction class is called without any instance calling the method & the class dont have Perform() or Execute() method.How my flow goes ???
Please revert back for any doubts in my question ...
Thanks Folks.. Expecting a answer.
|
 |
Joe Ess
Bartender
Joined: Oct 29, 2001
Posts: 8264
|
|
Welcome to the JavaRanch.
the class dont have Perform() or Execute() method
BatchChildDetailAction inherits the perform method from BatchTypeDetailAction.
|
"blabbing like a narcissistic fool with a superiority complex" ~ N.A.
[How To Ask Questions On JavaRanch]
|
 |
Shan Krish
Greenhorn
Joined: Oct 12, 2010
Posts: 4
|
|
Thanks Joe ,
Yes, you are right . But when "BatchChildDetailAction" is intially called , will it automatically looks for the Perform() method in default ?.
And again further BatchTypeDetailAction extends TypeDetailAction extends GetDetailActionBase which contains another Perform() method , so will the hirarchy keeps going to call the upcoming Perform() method with ends in ActionBase class ? or will it stop with the first Perform() and process it ? .
BatchChildDetailAction ---- BatchTypeDetailAction- Perform() ---- TypeDetailAction ---- GetDetailActionBase -Perform() ---- ... ----- .... ----- ... ----- ActionBase -Perform()
These question arises since the code is a userdefined struts framework which even the ActionBase & ControlServlet is.
Thanks
Shan
|
 |
Joe Ess
Bartender
Joined: Oct 29, 2001
Posts: 8264
|
|
Struts Actions follow the same rules of inheritance that are true for any Java class. You should have a look at the Java tutorial, in this case, the chapter on Inheritance.
A little reading now will save you a lot of agony in the long run.
|
 |
 |
|
|
subject: Calling a Action class which doesnt have a Perform() or Execute() method.
|
|
|