如何在oracle形式下禁用F8
如何在 Oracle 表单中禁用 F8?我开发了一个表单并为保存按钮添加了验证。但用户通过按 F8 保存表单来绕过此验证。
我将验证检查放入 KEY-COMMIT
触发器中。
我使用 Oracle Forms 6i。
How I can disable F8 in oracle forms? I have developed a form and put verification for the save button. But users bypass this verification by pressing F8 to save the form.
I put my verification check in KEY-COMMIT
trigger.
I use Oracle Forms 6i.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您不应将验证代码放入 KEY-COMMIT 触发器中,因为正如您现在所知,这只是提交表单的一种方式。除了 F8 键之外,用户还可以退出表单并对“您要保存更改吗?”回答“是”。等等。
要验证记录,请使用 WHEN-VALIDATE-RECORD 触发器。要执行更复杂的验证,您可以使用 POST-FORMS-COMMIT 触发器。
我最近不得不处理类似的问题,开发人员在“输入查询”按钮的“按下按钮时”触发器中放置了一些重要的初始化代码。如果用户按相应的键输入查询,或者使用菜单,或者使用工具栏,则表单会变成一堆。
You should not put validation code in the KEY-COMMIT trigger because, as you now know, that is just one way that the form can be committed. In addition to the F8 key it could be that the user exits the form and answers "yes" to "Do you want to save your changes?" and so on.
To validate a record, use the WHEN-VALIDATE-RECORD trigger. To perform more complex validation you can use the POST-FORMS-COMMIT trigger.
I had to deal with a similar problem recently where the developer had put some vital initialision code in the WHEN-BUTTON-PRESSED trigger of an "Enter Query" button. If the user pressed the appropriate key for Enter Query instead, or used the menu, or used the toolbar, the form fell over in a heap.