允许仅选中Oracle apex中的一个复选框 [英] Allow to check only one checkbox in Oracle apex

查看:101
本文介绍了允许仅选中Oracle apex中的一个复选框的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用apex_item.checkbox创建了带有复选框的经典报表.我想知道如何只允许选中复选框.也就是说,如果我单击的复选框超过了复选框,警告消息应该显示.请帮帮我

I created classic report with check boxes using apex_item.checkbox .I want to know how to allow to check only checkbox.That is if i click more than checkbox alert message should display.Please help me out

谢谢.

推荐答案

如果要通过动态操作执行此操作,则需要对事件Change,选择类型jQuery选择器和正在输入的jQuery选择器进行动态操作[名称=东西"]

If you want to do this via dynamic actions then you will want do a dynamic action on event Change, Selection Type jQuery Selector and the jQuery Selector being input[name = "something"]

您可以通过直接运行页面来解决此问题,如果单击键盘上的F12,将打开控制台.然后选择作为您的复选框的元素并找到其名称,这应该是您的东西".试一下以使其正常工作(将DA设置为运行警报或触发警报时可以查看的东西).

This something you can figure out by running the page as is, and if you click F12 on your keyboard, the console will open. Then select the element that is your checkbox and find its name and this should be your "something". Play around with this to make it work(set the DA to run an alert or something to see when its triggered).

然后可能有一个页面项目在运行此DA时被填充,然后,如果该页面项目已被填充并且DA运行,则抛出一个错误,表明您不能执行此操作.

Then perhaps have a page item that is filled when this DA runs, and then if the page item is already filled and the DA runs, throw up an error saying you cant do this.

或者,如果您想清除以前的复选框,则可以将当前复选框的名称保存在页面项中.并让DA执行一项javascript函数,以清除页面项中字段中的值.

Or if you want to clear the previously checked box, you could save the name of currently checked box in the page item. And have the DA do a javascript function that clears the value in the field in the page item.

基本上让DA从存储它的项目中获取复选框的名称,然后执行一些动态javascript.当我需要做些类似的事情时,我在javascript中创建了一个像$ s("+ Checked_box +",");这样的变量.用concat组装它.然后执行评估(this_concacted_instruction).

Basically have the DA get the name of the checked box from the item where you store it, and do some dynamic javascript. When I needed to do something similair I created a var in javascript that was formed like $s(" + checked_box + ", ""); assembling this with concat. And then do an eval(this_concacted_instruction).

我希望我的闲逛会引导您找到解决方案.我记得我第一次使用这种东西时,我花了一个星期的时间来整理一页(尽管这比您的问题要困难一些),但是当我完成时感觉很好.因此,请继续尝试.

I hope my ramblings guide you to a solution. I remember the first time I was working with this stuff I took a week to get one page sorted(although it was a bit more difficult than your problem), but it felt sooo good when I got it done. So keep on trying.

GLHF

这篇关于允许仅选中Oracle apex中的一个复选框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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