New Oracle@Oracle paper shows how GoldenGate allowed for real-time operational reporting for Oracle E-Business Suite: http://t.co/SQVfHcD7
Select All / Deselect All
(written for Apex v 3.x)
To make it easy for you application users, there may sometimes be the need for a "Select All" and "Deselect All" functionality for your checkbox group.
In this example, I have used icon buttons for the functions, as seen in the image below.
1) I uploaded the images I want to user for my buttons into the shared components of my application. These images are called:
deselect_all.gif
select_all.gif
2) I have then created a checkbox item on my page called P1_BUSINESS_GROUP.
3) I have placed this checkbox within its own Page Region, the title of this region being "Business Group", which is what is displayed in the image.
4) Place this javascript function into the HTML Header of your page definition:
<script type="text/javascript"></span><br /><span class="Moobi_Code">function get_Checkboxes(p_itemname)
{
var ip=document.getElementsByTagName('INPUT');
var ret=new Array();
var regexp=new RegExp('^'+p_itemname+'_');
for (var j=0;j<ip.length;j++) {
if (ip[j].type=="checkbox"
&& ip[j].id && ip[j].id.match(regexp))
ret.push(ip[j]);
}
return ret;
}
</script>
4) In the LABEL field of my P1_BUSINESS_GROUP item, I have placed the following code:
<a href="#" onClick="html_CheckAll(null,true,get_Checkboxes ('P36_BUSINESS_GROUP'))"> <img src="#WORKSPACE_IMAGES#select_all.gif" valign="bottom" title="Select All"></a> <a href="#" onClick="html_CheckAll(null,false,get_Checkboxes ('P36_BUSINESS_GROUP'))"> <img src="#WORKSPACE_IMAGES#deselect_all.gif" valign="bottom" title="Unselect All"></a></span><br /><br /><br /><img src="images/stories/APEX/Items/select_deselect_all_fieldcode.jpg" alt="select_deselect_all_fieldcode" width="634" height="135" />
&& ip[j].id && ip[j].id.match(regexp))
ret.push(ip[j]);
}
return ret;
}
</script>


