AXForum  
Вернуться   AXForum > Microsoft Dynamics AX > DAX: Программирование
DAX
Забыли пароль?
Зарегистрироваться Правила Справка Пользователи Сообщения за день Поиск Все разделы прочитаны

 
 
Опции темы Поиск в этой теме Опции просмотра
Старый 19.11.2019, 12:42   #1  
SuperStar88 is offline
SuperStar88
Участник
 
79 / 10 (1) +
Регистрация: 11.08.2017
? AX 2009. SysListPageHelper::handleInitPreSuper
На некоторых формах в Init() прописаны такие штуки, для чего они?
(Например, форма InventTable)
X++:
    SysListPageHelper::handleInitPreSuper(element);

    super();

    SysListPageHelper::handleInitPostSuper(element);
Старый 19.11.2019, 16:00   #2  
dech is offline
dech
Участник
Аватар для dech
Самостоятельные клиенты AX
 
642 / 347 (13) ++++++
Регистрация: 25.06.2009
Адрес: Омск
Записей в блоге: 3
Цитата:
Сообщение от SuperStar88 Посмотреть сообщение
На некоторых формах в Init() прописаны такие штуки, для чего они?
(Например, форма InventTable)
X++:
    SysListPageHelper::handleInitPreSuper(element);

    super();

    SysListPageHelper::handleInitPostSuper(element);
Как насчет заглянуть внутрь и посмотреть как оно работает? Там и с документацией тоже все норм вроде.
X++:
/// <summary>
/// Performs all necessary actions for preparing to open a task page from a list page that should be
/// taken during the <c>init</c> method before calling the <c>super</c> method.
/// </summary>
/// <param name="taskPageFormRun">
/// The <c>FormRun</c> instance that is being opened.
/// </param>
/// <remarks>
/// Call this method during the <c>Init</c> method of the form before the <c>super</c> method. This
/// method may clear the table record that is held in the <c>args.record</c> property.
/// </remarks>
public static void handleInitPreSuper(FormRun taskPageFormRun)
{
    ;

    if (taskPageFormRun == null)
    {
        throw error(strfmt("@SYS115249", #taskPageFormRun));  // "The argument 'taskPageFormRun' cannot be null."
    }
    if (taskPageFormRun.args() == null)
    {
        throw error(strfmt("@SYS115334", #taskPageFormRun, #Value_Args));   // "The FormRun parameter '%1' cannot have a null args() value."
    }
}
X++:
/// <summary>
/// Performs all necessary actions for preparing to open a task page from a list page that should be
/// taken in the <c>init</c> method after you call the <c>super</c> method.
/// </summary>
/// <param name="taskPageFormRun">
/// The <c>FormRun</c> instance that is being opened.
/// </param>
/// <remarks>
/// If the form has been opened by using the <c>FormOpenMode::ForEdit</c> parameter, the query,
/// including the user-defined filter, from the list page that opened this form will be copied and used
/// for this form. The selected record from that list page will be selected on this form. Any order-by
/// settings and the sort index will be cleared on the form and replaced with a new order-by based on
/// the <c>RecId</c> value.
/// </remarks>
public static void handleInitPostSuper(FormRun taskPageFormRun)
{
    if (taskPageFormRun == null)
    {
        throw error(strfmt("@SYS115249", #taskPageFormRun));  // "The argument 'taskPageFormRun' cannot be null."
    }
}
__________________
// no comments
Старый 19.11.2019, 17:42   #3  
wojzeh is offline
wojzeh
Участник
Аватар для wojzeh
Соотечественники
 
672 / 512 (19) +++++++
Регистрация: 27.04.2006
Адрес: Montreal
для выноса программной логики формы в отдельный класс.
грубо говоря, проще допилить такой класс, чем наворачивать спагетти непосредственно в форме.
ну, это в идеале.
__________________
Felix nihil admirari
 

Похожие темы
Тема Автор Раздел Ответов Посл. сообщение
stephenmann: Technical History of Dynamics AX - From Axapta 3.0 to AX2012 Blog bot DAX Blogs 5 03.03.2017 10:22
emeadaxsupport: AX Performance Troubleshooting Checklist Part 2 Blog bot DAX Blogs 0 09.09.2014 16:11
semanticax: Dynamics AX 2009 Installation - Application Blog bot DAX Blogs 0 22.12.2010 08:11
mbsturk: Ax 2009 Rollup 4 Version Checker Blog bot DAX Blogs 0 29.04.2010 17:05
emeadaxsupport: List of fixes that improve performance of certain features in Dynamics AX 2009 Blog bot DAX Blogs 0 13.10.2009 19:06
Опции темы Поиск в этой теме
Поиск в этой теме:

Расширенный поиск
Опции просмотра

Ваши права в разделе
Вы не можете создавать новые темы
Вы не можете отвечать в темах
Вы не можете прикреплять вложения
Вы не можете редактировать свои сообщения

BB коды Вкл.
Смайлы Вкл.
[IMG] код Вкл.
HTML код Выкл.
Быстрый переход

Рейтинг@Mail.ru
Часовой пояс GMT +3, время: 16:17.
Powered by vBulletin® v3.8.5. Перевод: zCarot
Контактная информация, Реклама.