Tuesday, May 19, 2015

Creating an APEX V5 Application – Part 2

In my earlier post I described how to create a basic app to display tablespace information in APEX V5, which is quite different from V4.

I’ll continue to play around, and put my experiences here. This time I'll hide some columns from the report, add a new region and move it around the page. Exciting!


So, open the page created in the previous post :


This has too much information, so I want to hide some of the columns.

Click on ‘Edit Page 1’ to enter edit mode:


OK, where to start?

I could just rewrite the SQL, but this is an APEX article.

In the left hand pane, expand the ‘Columns’ item:


I want to hide a few of these. So, I select one I want to hide, and then in the right-hand pane select  the ‘Hidden’ drop-down item under ‘Type’:


Save it, and then run the page using the ‘Run’ icon:


It's gone!



So, just repeat for the other columns. You can ‘ctrl-click’ or ‘shift-click’ in the left hand pane to multi-select.



And set them all to ‘Hidden’ in the right-hand pane:


The page looks tidier now.


One thing I noticed while doing this – the edit page and ‘normal’ page open in different tabs – this makes editing a lot faster as it just switches tabs.


Nice.

OK, let’s add a new region that shows the host name and database name and startup time.
Instead of drag and drop, you can use the old fashioned way. Click on the ‘Create’ icon:


At the pop-up, click on the type (I tend to chose Classic):


Give it a name and change details as required:


Click ‘Next’

If you were basing this report on a table, enter the details here:


Otherwise click on ‘SQL Query’ and enter the SQL:


Click ‘Next’

Change any settings here – for example, I know this will only be 1 row.


Click 'Next'



Click ‘Create Region’


The new region appears:


Click 'Save' and 'Run'


Note that because I set my date formats when creating the application in the earlier post, it shows the time – if not, you can change this in the column formatting.

OK, it looks good, but I want to see the database details above the tablespace table.

Go back to edit mode.


When creating regions in the previous version, you needed to enter the sequence number to determine where they appeared in the page. This new version allows you to drag and drop. So just click on the ‘Database Details’ section and drag and drop it above the ‘Tablespaces’ section:


Another nice feature.

Click 'Save' and 'Run'




So that's some more of the basic functionality in the new version. Next time I’ll look at adding links to a column item to direct to another page.














No comments:

Post a Comment