Posts

Showing posts from March, 2021

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 generate the documentation; As mentioned b

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

Image
This blog post describes how you can style an Interactive Grid cell conditionally based on the value of another cell using JQuery and CSS.  Using APEX Version 19.2. The requirement is to highlight the cell that has the highest value in the row; This can be achieved by setting the IG column CSS class and using JQuery to loop round the table rows to conditionally set CSS style based on cell values First give all your columns a CSS Class (note you can give columns multiple classes separated with space) in this case all 4 columns are set with CSS class SCORE_C_1, SCORE_C_2, SCORE_C3 and SCORE_C_4 in the column Appearance; We now add the JavaScript in Execute when page loads (preferably put this is a JS file). We are using the JQuery $.each() method to fetch every table row;  $.each($('tbody tr'), function(i, item) {} and the JQuery text() method to get the column value from the row using the column CSS class names;         var scoreC1 = $(item).find('.SCORE_C_1').text();  

Popular posts from this blog

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

Oracle APEX pretty checkbox item plugin

Build beautiful and interactive API documentation for ORDS