Friday, 23 October 2015

Blog posts (blogspot) in Oracle APEX

How to get your latest blog posts in your APEX applications?

Quick ref guide


Very recently I have posted my notes on how to get your Twitter tweets in you APEX applications and this post is very similar with initial request.

We were doing some changes on our public websites and decided it would be cool to be able to automatically retrieve latest posts from our team blogs. After an initial research this is the easiest way to do this. 

Step 0. Download google API JS or simply reference it on your page https://www.google.com/jsapi

Step 1. create a simple static content region with a static ID of your choice. 
In my example this is region with ID set to Blog_region.

Step 2. Add this to your HTML page header
<script type="text/javascript" src="#WORKSPACE_IMAGES#google_jspi.js"></script>
    <script type="text/javascript">

    google.load("feeds", "1");

    function initialize() {
      var resultLimit = 5;
      var blogURL = 'http://lschilde.blogspot.com/feeds/posts/full?max-results='+ resultLimit;
      var feed = new google.feeds.Feed(blogURL);
      feed.setNumEntries(resultLimit); //this restics how many rows to return
      feed.load(function(result) {
        if (!result.error) {
          var HTML_content = '<div class="row">  <div id="leftcol">';
          for (var i = 0; i < result.feed.entries.length; i++) {
          var entry = result.feed.entries[i];
          var publishedDate =   entry.publishedDate;
          var title = entry.title;
          if(title.length == 0){
              var field = entry.content;
              var title = field.substr(115, field.indexOf("</span></h2><h3 ")-115);
                entry.content = entry.content.replace(title, "");
                //alert(title);
              }
          HTML_content += '<article class="post"><div><h3 class="post_title"><a href="'
                     + entry.link
                     + '" target="_blank">'
                     + title
                     +'</a></h3> <div><i class="fa-time"></i> '
                     + entry.publishedDate
                     +' </div></div><div>'
                     + entry.content
                     + '<br><a href="'
                     + entry.link
                     + '" target="_blank" class="btn btn-primary">Read More</a> </div> </article> ';

        
          }//end loop
      

          HTML_content += '</div> </div>';

         //add this feed html code to APEX REGION
          $("#Blog_region").append(HTML_content);
        }
      });
    }
    google.setOnLoadCallback(initialize);
  
    </script>
Together with this CSS:
article.post .post_title .btn {
    margin-top: 30px;
}
.btn-primary {
    background-color: #428bca;
    border-color: #357ebd;
    color: #ffffff;
}
.btn {
    -moz-user-select: none;
    background-image: none;
    border: 1px solid transparent;
    border-radius: 4px;
    cursor: pointer;
    display: inline-block;
    font-size: 14px;
    font-weight: normal;
    line-height: 1.42857;
    margin-bottom: 0;
    padding: 6px 12px;
    text-align: center;
    vertical-align: middle;
    white-space: nowrap;
}
a {
    color: #428bca;
    text-decoration: none;
}

Please check it out in live demo - Blog in APEX

 

Except few parameters that you can reconfigure and make dynamic this is all. One note is that sometimes depending on your blog template title field can be returned as empty hence the title.length hack.

Happy to share.

Cheers,
SLino


Thursday, 22 October 2015

Oracle Live SQL

An easy way to try and learn new SQL and PL/SQL things 

Access to hundreds of ready made scripts and more

Few weeks ago Oracle announced another great tool to help and make us developers more productive. It is a live PL/SQL environment in your browser without having to install anything.

You now have the ability (along with apex.oracle.com) to access online easily configurable environment to test, try your coding or browse community written examples to help you with your ideas. 

Personally I think idea is brilliant, the more tools we have it makes our lives easier. 

You can create your own tables, write and upload scripts, write your own queries plus be able to download and try many community written code. 

If nothing check it out I am sure you will not be disappointed - Oracle Live SQL 


Best of all notice that it all is done with ORACLE Application Express. :)

Thanks Oracle and happy coding,
SLino

Tuesday, 20 October 2015

Oracle APEX 5.0.2 patch released

Oracle Application Express Release 5.0.2.00.07

New APEX patch available for download


After ODTUG secret meeting and announcement of APEX.WORLD going live another update arrived. This time from ORACLE.

APEX 5.0.2 is now available for download.


Table 1 Bugs Fixed in the Oracle Application Express 5.0.2.00.07 Patch Set
Bug Number Description
18593436 LAYOUT.T_ITEM_EXCEEDS_MAX ERROR on post
20220385 Unable to generate DDL in SQL Workshop
21162720 Survey Builder scheduled job EBA_SB_SURVEY_JOB not being created properly
21392729 Internal application interactive report subscription sends W/O attachment and error
21410037 HTTP_ERROR_STATUS_ON_ERROR_PAGE_ENABLED is ignored
21434612 Websheet SSO error: Error Processing Authentication
21435234 Plug-Ins: Region columns not found for translated applications
21435330 Notification message checksum content error on login when time zone detection
21441233 Database application SSO internal error if application has cleanup Pl/SQL Code
21445226 Column CSS classes not available in translated version
21463521 Images directory not up-to-date warning after applying 5.0.1 patch set
21464312 ORA-02091: transaction rolled back when importing application in SQL*Plus
21464648 Refresh theme deletes display points in page and region templates
21469957 Cannot perform a DDL Commit error due to LOV query with binds in classic report
21473086 Live Poll authenticated polls do not work
21479385 APEX_WEB_SERVICE.MAKE_REST_REQUEST results in ORA-06502 if P_BODY pass as Null
21488152 Error when creating select list with named LOV using Create Item Wizard
21494010 P-Track Timeline region on page 10 throws result of String Concatenation Too Long
21507110 Error when importing workspace export containing user profile images
21516469 Websheet tree folder icons are not visible
21531843 apxremov.sql does not remove all public synonyms
21536514 Classic report (based on function) raises error in Page Designer
21537995 Static Images broken for old workspaces when using Oracle Application Express 5.0 And Oracle REST Data Services (ORDS) 3
21538532 Core.css in Application Express UI surpasses Microsoft Internet Explorer's Selector Limit
21546558 Page Designer allows to define parent region to point to it's own sub region
21548833 Ora-01031 when importing REStful Service into Oracle Application Express runtime installation
21567249 Patch Set install should purge Page/Region Cache to avoid file caching issues
21574013 Unique constraint violation error when importing apps containing translations
21610534 Preferences in the User Name displays an empty field for default schema
21610816 Lost schema and cannot delete user after created user through Package App Entry
21611929 Install package Websheet causes identifier SYS.DBMS_SESSION must be declared
21618837 Image Prefix Specified For An Application Is Cleared If Application Is Modified
21621365 Error when trying to import workspace in Instance Administration
21628965 Using Microsoft Internet Explorer 11 Page Designer cannot use Property Editor scroll bar
21679505 Data Loading - Transformation Rules report shows 15 rows max without pagination
21763773 Workspace export code should not use SQL Collect function
21770724 Upgrading Data Reporter to newer version throws error
21789314 Remove redundant public synonyms for Anychart 3 objects
21812064 ORACLE_APEX scheduler jobs from prior version persist after upgrade
21817814 Ora-01467 (Sort Key Too Long) when using Create Application Wizard With Master/Detail
21819913 Rows Per Page on a private saved report is not preserved upon import
21826787 Data Reporter: Whitelist error when creating interactive report
21839850 Real Player causes redirects in Application Express to start page with a changing session ID
21882582 SSO Authentication should use HTTP 302 redirect to login server
21882834 APEX_JSON: Invalid Output when combining Write(Cursor) with other writes
21886782 Unwanted encoding <BR /> in Page Views By Hour Page
21901376 ORA-06502 when calling APEX_UTIL.PREPARE_URL in classic report query
21901663 Labels/placeholders missing in Login field for Application Builder
21922914 Page Designer fails if a Date Column of an interactive report query changes to Timestamp
21945297 APEX_JSON.WRITE(NAME,SYS_REFCURSOR): Missing attribute name if nested cursors
21983878 App export error ORA-06502: PL/SQL: Numeric or value error: Raw variable length



Happy upgrading,
SLino

Monday, 12 October 2015

First NZ Oracle APEX specializing company

APEX R&D New Zealand

We are pleased to announce that APEX R&D now offers its services to New Zealand and Australian based clients as the first New Zealand Oracle APEX specialized company.
 APEX R&D

Contact our team of experienced professionals for innovative, reliable and cost effective ORACLE APEX solutions.

Regarding any custom application development, training/coaching or consulting related to Oracle APEX technology we would love to hear from you.

Dimitri Gielis- APEX R&D Founder and Oracle ACE director

Lino Schildenfeld – Director APEX R&D NZ/AU and Oracle APEX specialist
         "Your  requirements. Our  experience.  Successful projects."

For more information please contact us on: APEX R&D New Zealand
We look forward working with you.

Regards,

APEX R&D Team