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

 
 
Опции темы Поиск в этой теме Опции просмотра
Старый 18.09.2012, 18:11   #1  
Blog bot is offline
Blog bot
Участник
 
25,459 / 846 (79) +++++++
Регистрация: 28.10.2006
ax-erp: Overriding method for a control in dialog (RunBase framework)
Источник: http://microsoft-dynamics-ax-erp.blo...in-dialog.html
==============

Scenario:Can we have an overridden method in a dialog class. I can not use form as a dialog. I have to add a method in the dialog class. Like modified method of an EDT.

Answer:Well it can be done. First you have to add a method dialogPostRun

public void dialogPostRun(DialogRunbase dialog)
{
;
dialog.dialogForm().formRun().controlMethodOverload(true);
dialog.dialogForm().formRun().controlMethodOverloadObject(this);
dialog.formRun().controlMethodOverload(true);
dialog.formRun().controlMethodOverloadObject(this);
super(dialog);
}

This method actually allows the dialog form to override control method at runtime. Now we need the name of the control at runtine that needs the overriden method. You can get that using

print dialogCustId.name();
pause;

where dialogCustId is the EDT. let say the name returned at runtime is Fld3_1.


Now if you have to override lookup method of the EDT you can write the method like this

void Fld3_1_lookup()
{
//override lookup method here
}

If you need to override modified method

boolean Fld3_1_modified()
{
}

.
The modified method can also be accessed by overriding

public void dialogSelectCtrl()
{
}

in the runbase class. Just call

dialog.allowUpdateOnSelectCtrl(true);

in the dialog method.

You can also create a dialog form and pass it as the parameter in the dialog method of runbase class. you can find an example in tutorial_runbase class and form.



Источник: http://microsoft-dynamics-ax-erp.blo...in-dialog.html
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору.
 

Похожие темы
Тема Автор Раздел Ответов Посл. сообщение
equalized: Dynamics Ax RunBase overriding dialog with a Form Blog bot DAX Blogs 0 19.01.2012 19:11
equalized: Dynamics Ax RunBase overriding dialog with a Form Blog bot DAX Blogs 0 15.01.2012 05:17
emeadaxsupport: New Content for Microsoft Dynamics AX 2012 : October 2011 Blog bot DAX Blogs 0 27.10.2011 17:11
equalized: Dynamics Ax RunBase overriding dialog with a Form Blog bot DAX Blogs 0 15.10.2011 18:11
axinthefield: Dynamics AX Event IDs Blog bot DAX Blogs 0 01.03.2011 22:11
Опции темы Поиск в этой теме
Поиск в этой теме:

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

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

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

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