访问列表页面表单中的按钮的正确方法是什么? [英] What is the right way to access buttons in list page form?

查看:116
本文介绍了访问列表页面表单中的按钮的正确方法是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在带有模板 列表页的ax 2012窗体中,通常无法访问按钮上单击的方法。只是不允许您覆盖方法`clicked

您可以通过将按钮属性 DisplayTarget设置为值 Client 来更改此行为。比您可以更改 clicked 方法的代码。但这感觉不对。

In ax 2012 in form with template "list page" you normally cannot access the clicked method on the button. You are just not allowed to overwrite method `clicked

You can change this behavior by setting the button property "DisplayTarget" to the value "Client". Than you can change the code of clicked method. But it does not feel right.

有什么方法可以更好地访问单击方法?例如,通过使用链接到表单属性的 * FormName * ListPageInteraction

Is there any way how to access clicked method better way? For example by using *FormName*ListPageInteraction which is linked in form properties?

PS:我知道您可以菜单项(操作)->并调用某些类。但是,当您不想在新窗口中打开新表单(通过使用菜单项[显示]),但是想要更改当前表单上的某些内容时,感觉比覆盖单击的方法还要糟糕。

P.S.: I know you can make menu item (action) -> and call some class. But when you do not want to open new form in new window (by using menu item [display]), but you want to change something on current form it feels even worse than overwriting clicked method.

推荐答案

设置将DisplayTarget 属性设置为值客户端将隐藏按钮从企业门户使用。如果您不打算在EP中使用列表页面,请继续。

Setting the DisplayTarget property to the value "Client" will hide the button if used from Enterprise Portal. If you not plan to use the list page in EP then go ahead.

否则,您将必须将代码放入目标格式 init 或类 main 方法。

Otherwise you will have to put your code in the target form initor class main method.

这篇关于访问列表页面表单中的按钮的正确方法是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆