This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

function overloading problem

 
Karan Agnihotree
Greenhorn
Posts: 11
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all
I have a Controller from where i am calling two functions with same name and different defnitions. I am overloading the fuction in the service class. But even after building I am getting a error saying the class does not have a method with the definition of the function which was added newly.

Please find the code snippet below.

ReturnStatusBase rtBase = serviceTenderImpl.getServiceHistoryDetails(emailId,location+ticket);


ActionErrors errors = new ActionErrors();
int transactionStatus = rtBase.getReturnStatus();
if (transactionStatus < Constants.TRANSACTION_SUCCESS)
{
// transaction failed
handleErrors(errors, rtBase, pageLabels, getRequest());
logger.log(Level.DEBUG, "submitServiceHistory", 0, "submitServiceHistory(): Exiting.");
return new Forward("failure");
}

errors.add("Mail Sent", new ActionError("success",location+ticket,emailId));
this.saveErrors(getRequest(), errors);

logger.log(Level.DEBUG, "submitServiceHistory", 0, "submitServiceHistory(): Exiting.");
//return new Forward("success", form);
returnString="SHSTsuccess";
}
else if(requestType=="WAFG")
{
ReturnStatusBase rtBase = serviceTenderImpl.getServiceHistoryDetails(emailId);
ActionErrors errors = new ActionErrors();
int transactionStatus = rtBase.getReturnStatus();

Functions i have italisezed.

Please help in this regard.

Thanks

Karan
 
Karan Agnihotree
Greenhorn
Posts: 11
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am using the weblogic workshop for the same
 
Don't get me started about those stupid light bulbs.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic