如何访问 APEX 中选择列表控件的值?
我有一个选择列表和一个删除按钮。单击删除按钮时,应该运行查询从数据库中删除所选项目。如何引用选择列表中的选定项目?我可以通过以下方式引用选择列表:P11_ITEMS
I have a select list and a DELETE button. When the delete button is clicked, a query is supposed to run DELETING the selected item from the database. How can I reference the selected item in the select list? I can reference the select list by :P11_ITEMS
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
使用 Apex 4.01,我创建了以下示例:
一个仅包含选择列表和删除按钮的页面
I选择 ALLEN 并按删除
,您可以看到 ALLEN 现已被删除。
除了创建这两个项目之外,唯一的其他项目是页面处理 PLSQL 进程,称为delete_emp。
delete_emp 进程具有以下引用选择列表的删除语句。
Using Apex 4.01, I created the following example:
A page with just a select list and a delete button
I select ALLEN and press delete
and you can see ALLEN has now been deleted.
Other than creating the two items, the only other item is a Page Processing PLSQL process, called delete_emp.
The delete_emp process has the following delete statement that references the select list.
您应该能够通过引用您的选择列表
:P11_ITEMS
来引用您选择的选项。但是,如果您的会话状态没有此项的当前值,则您的页面处理可能会出现故障。确保页面提交后运行页面进程(这会将选择列表项值保存到数据库以供以后使用)。You should be able to reference your selected option by referencing your select list
:P11_ITEMS
. But if your session state has no current value for this item, your page processes may be out of order. Make sure you have your page process running after page submit (which saves the select list item value to the database for later use).