Friday, 15 May 2015



Navigation Tabs in APEX 4.2.x as List element

Render tabs in your application from a list query

How to create page navigation similar to APEX 5.0?

Just a useful info about how you can render you tabs based on query based LIST element.

One of the most important thing before creating your application is to consider the navigation options you will have. Most common way of doing this in pre 5.0 version was by using application tabs. 
In this post I will not go into details how you can render tabs in APEX applications as it is more or less self explanatory.

Ideally wouldn't it be great if you could have your Tab elements rendering from your database queries? 

This is exactly what I will be concentrating on.

To start with you need to create an application with Page 0

then you need to create a list using a query: 

 SELECT null,
       'Home' label,
       'f?p=&APP_ID.:1:'||:APP_SESSION||':::::' target,
       null is_current
FROM  dual
union

SELECT null,
       'Page2' label,
       'f?p=&APP_ID.:2:'||:APP_SESSION||':::::' target,
       null is_current
FROM  dual
Next thing is to create a region on Page 0 that will be using this -> List region with No Template option. 
And a display point set to After Header. Please note this will need to be changed before your tabs will be working.

All that is needed more to make this work is to change application Theme default page type by going into Shared components -> Themes -> Blue Responsive 25 -> Edit Theme


Go back to page 0 and change Display point of you List region to be Region Position 06.  Apply changes and run your application.

That is it.
:)

SLino

Wednesday, 13 May 2015




Tabular forms and "Select ALL" check-box

Issue in APEX with tabular forms

Have you come across something like this before? Appreciate your feedback

 

Situation is a simple tabular form and a requirement from a client to implement select all check box similar to the one above -> "Printed" that should let you select all rows once that check-box is ticked.

Can be any simpler than this right? Well it turned out to be a tricky beast that we still haven't able to find an answer for. 

It is fairly easy to make JavaScript call to mark all check-boxes in Printed Column with 
<input type="checkbox" onclick = "$f_CheckFirstColumn(this)">
but problem arises when you try to submit the form using standard ApplyMRU process. 

Clearly you would expect for APEX to be able to submit something like this, especially since it normally handles rows that are checked by a user.

For some reason all rows selected in this way do not get over to database. 

I am not quite sure if this is a bug in APEX or a "session state" problem but nothing that we tried couldn't make a form to save All selected rows that JavaScript has triggered.

For this reason I wanted to write a blog  post to see if you experienced something similar to this. I would highly appreciate any feedback about it. 

I am aware that check-boxes in tabular forms are a tricky thing and have created numerous processes that loop, validate and what not but I never experienced something similar to this.

Workaround for now seemed to be in standard On Submit PL/SQL process where we manually are updating rows returned by this report. Not the ideal way but it sort of fits the purpose.

Appreciate your thought.

Cheers,
SLino