• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Calling a Action class which doesnt have a Perform() or Execute() method.

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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.
 
Bartender
Posts: 9626
16
Mac OS X Linux Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Welcome to the JavaRanch.

the class dont have Perform() or Execute() method



BatchChildDetailAction inherits the perform method from BatchTypeDetailAction.
 
Shan Krish
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 9626
16
Mac OS X Linux Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
reply
    Bookmark Topic Watch Topic
  • New Topic