RE: Call super in Extension class
HI Martin/Anton,
Thanks for your replies. Im using CoC, and when i have used the following code.
public boolean validateWrite()
{
boolean ok;
Amount amount;
amount = this.orig().SalesPrice;
ok = next validateWrite();
if (this.SalesPrice == 0 && this.SalesPrice != amount)
{
warning(strFmt("@BSS:ProjForecastSalesPrice", this.SalesPrice, amount));
}
if (!this.BASRfcCategoryCode)
{
ok = checkFailed("RFC category is required. Please enter a value.");
}
return ok;
}
It's returning the warning only after closing the form. But user expects this warning to prevent form closing. And when I checked the ValidateWrite method, The ret is calling the super like below. Please suggest what to do.
public boolean validateWrite()
{
ProjValCheckTrans projValCheckTrans = new ProjValCheckTrans();
boolean ret;
ForecastModel forecastModel;
boolean isProjForecastReduced;
isProjForecastReduced = this.isProjForecastReduced();
ret = super();
if (ret)
{
ret = this.checkModel() && ret;
ret = this.checkActivity() && ret;
ret = ProjTable::find(this.ProjId).status().validateWriteBudgetEmpl() && ret;
ret = projValCheckTrans.validateMandatory(this) && ret;
ret = ProjForecastPost::newPostForecastEmpl(this).runCheck() && ret;
if (ret)
{
if (ProjTable::find(this.ProjId).StartDate > this.SchedFromDate)
{
ret= checkFailed("@SYS107206");
}