Posts

Showing posts from September, 2022

Build beautiful and interactive API documentation for ORDS

Image
In this blog post, I will show you how to quickly build beautiful and interactive API documentation for your Oracle APEX REST data sources using  swagger hub . Using APEX v23.1. I downloaded the  titanic data set  and loaded them into tables in my APEX instance, created some authorized restful services and published them using swagger hub. You can create a free account on swagger hub.   Check out my titanic swagger hub here ; Press Authorize. Username REST, password Glasgow123! I won't go through creating RESTful services and just show you the four I created that sit on top of the titanic data set; The GET is a very simple SQL query;      select * from TITANIC_DATA_SET_NEW A handy tip is to add comments, as there will appear on swagger hub, making your API self documenting; Once you have created your modules, press the Generate Swagger Doc button; This will generate an open API for you.  Copy the API and paste it into swagger hub This will generat...

Oracle APEX pretty checkbox item plugin

Image
Following on from the animated on off button this is now an item plugin.  Pretty up your checkboxes..... You have 16 checkbox types to choose from where you can control the size and colour of the checkbox in item settings; demo Create a page item with type Pretty check box Choose type of checkbox Set checkbox attributes. How it works The item plug in code uses this code to plug the rendered checkbox into APEX. /////////////////////////////////////////////////////////////////////////////////////////// // glasgow_simple_checkbox // // Provides a plug- in specific implementation for a checkbox item. The item on the page // should be a checkbox, i.e. <input type = "checkbox" and name should be your item name // i.e. name = 'P12_NAME' // // Params // // itemName - the item name , i.e. name = 'P12_NAME' // checkboxValues - the check and unchecked values , i.e. Y/N /////////////////////////////////////////////////////////////////////////////////////////// f...

Oracle APEX animate yes-no button

Image
This post will show you how to add an animated on-off yes-no button to your APEX application and link it to a page item. Demo Create a new page text item, in my case P8_NEW. We are going to use this to store the selected value when the user presses the button Then create a static region with the following HTML code. When the button gets clicked we set P8_NEW using JavaScript. <div class= "mid" >   <label class= "rocker" >     <input type = "checkbox" id= "myCheck" >     <span class= "switch-left"  onclick= "apex.item( 'P8_NEW' ).setValue('Yes')" >Yes</span>     <span class= "switch-right" onclick= "apex.item( 'P8_NEW' ).setValue('No')" > No </span>   </label> </div> You can change the button text here to On/Off or whatever you need. Add the following code to page inline CSS to style the button. html {   box -sizing: bor...

Popular posts from this blog

Oracle APEX Interactive Grid colour cells based on a condition using JavaScript and CSS

Oracle APEX style an Interactive Grid cell conditionally based on the value of another cell using JavaScript and CSS

Add a timeline diagram chart to your APEX app - Part 2 of the HighChart Series