3

I want to disable the F5 refresh on a specific listpage, I disabled the refresh action key but the F5 still works. I can't overide the Task method on the SysSetupFormRun because it's a listpage. Is any way to do this?

The reason I want to do this is because some refreshproblems when having multiple datasources and I want to disable it for the customer until microsoft comes with a solution (issue is already logged).

Edit: As a fix I intercepted the task method on the SysSetupFormRun class, but this method only triggers when you have selected a record in your listpage. When you first open your listpage and immediately press F5 it does refresh and doesn't go in the task method.

4

1 回答 1

4

我知道你提到你没有成功覆盖taskSysSetupFormRun但是下面的代码在我们的测试系统中对我有用。

我将此代码插入到task类的方法中SysSetupFormRun以禁用 F5 SalesTableListPage

public int task(int _p1)
{
    #task
    FormDataSource formDataSource;

    int ret;

    if (_p1 == #taskFilter)
    {
        formDataSource = this.objectSet();
        if (formDataSource &&
            formDataSource.queryRun() &&
            formDataSource.queryRun().args() &&
            !formDataSource.queryRun().args().caller())
        {
            formDataSource.queryRun().args().caller(this);
        }
    }

    // -- Here is the interesting stuff
    if ((_p1 == #taskF5 || _p1 == #taskRefresh) && 
        (this.name() == formStr(SalesTableListPage)))
    {
        return ret;
    }
    return super(_p1);
}

如果该方法与您已经尝试过的方法相同,那么您可以忽略此答案 - 否则请随意尝试;)

于 2013-09-05T11:07:00.700 回答