1
1
2
OracleAPEX19.1&18.2TheGoldenNuggets
DietmarAustOpal-Consulting,Köln
www.opal-consulting.de
3AboutDietmar.
• Dipl.-Inform.DietmarAust,FreelanceConsultant• Master'sDegreeinComputerScience(MSCS)
• BuildingOraclebasedWebApplicationssince1997• Portal,Forms,Reports,OWAToolkit,nowAPEX!
• 1997-2000:ConsultantatOracleGermany
• Since09/2000:FreelanceConsultant,Since2006–APEXonly!
• AuthoroftheJasperReportsIntegrationtoolkit• http://www.opal-consulting.de/tools
• 2015DatabaseDeveloperoftheyearintheORDScategory
4AboutDietmar
• OracleACEfrom2012–2019• http://dietmaraust.com/quitting-the-oracle-ace-program-explained
• ContributingtotheOracle/APEXcommunityfrom2006...2050?
5Agenda
Coveringsmallernewfeaturesfrom18.2to19.1• SocialSign-InforWorkspace• DarkModeinyourapplications• UnificationofThemesundImprovementsinUT• InteractiveGridEnhancements• NewWizardGeneratedPages• SQLWorkshop• Othersmallernewfeatures• PL/SQLAPIs• Deprecatedandremovedfunctionality
6Versioninformationinlowerleftcorner
• Whenwasthatnewfeatureintroduced?
7Sampleapplication/slidesavailablefordownload
http://dietmaraust.com/blog
8
ApplicationBuilder
WorkspaceLogin
9SocialSign-InforWorkspaces
Newoptiontoauthenticateagainstthedevelopmentenvironment
APEX19.1
10SocialSign-InforWorkspaces
Someauthenticationschemeswillpresentalistofworkspaces• Accountwiththeidenticalnamemustexistintheworkspace
APEX19.1
11SocialSign-InforWorkspace
• Generalinformationonsettingupsocialsignin:– https://asktom.oracle.com/pls/apex/f?p=100:551:::,551:P551_CLASS_ID:5861
12OracleApplicationExpressOfficeHours
OracleApplicationExpressOfficeHoursOnAskTomisagreatresourcehttps://asktom.oracle.com/pls/apex/f?p=100:551
13
ApplicationBuilder
DarkMode
14DarkMode
• Whatisdarkmode?– Currentdesigntrend– ImplementedinoperatingsystemslikeMacOSMojave,Windows,Android,etc.
– Appsneedtosupportthat,notalldo
• Benefits– Stylish,newdesigntrend– Reduceseyestrain(atnight/workinglonghours)
APEX19.1
15DarkMode
• Switchingitonintheapplicationbuilder/workspace
APEX19.1
16DarkMode
UsingDarkModeinyourownapplications:1. CreateanewthemestyleinThemeRoller
2. Createnavigationbarentries=>runapplicationprocess
3. UseAPEX_THEME.SET_USER_STYLEtoswitchbetweenthemestyles
APEX19.1
17DarkMode
• AutomaticallydetectDarkModefromtheOS(DanielHochleitner):– https://twitter.com/Dani3lSun/status/1105842872723615744
APEX19.1
18DarkMode
Browser-support?https://caniuse.com/#search=prefers-color-scheme
APEX19.1
19
ApplicationBuilder
Themes
20Unificationoflegacythemes/UIinterfaces=>UT
OracleAPEXmovestowardsaunifiedstandardthemewhichisfullyresponsiveandprovidessupportformobiledevices.OracleUniversalTheme– Highlycustomizable:templateoptions/themeroller– Responsive/worksonalldevicesizes– Implementsfunctionalityformobiledevices(i.e.touchevents)aswell
APEX19.1
42
21Unificationoflegacythemes/UIinterfaces=>UT
• Deprecationofallpreviousstandardthemes...
• Youcannotcreatenewappsbasedonoldthemesanymore
• Existingapplicationscontinuetowork
• Custom(er)themescanstillbeusedfornewapplications
APEX19.1
22Unificationoflegacythemes/UIinterfaces=>UT
• MobileUserInterfaces(basedonJQueryMobile)REMOVED
• Theme51(jquery-mobile-ui)isdesupportedfornewapplications
• UpgradedapplicationsWILLBREAK!!!(conflictinJQuerylibraries)
APEX19.1
23Unificationoflegacythemes/UIinterfaces=>UT
• MobilecapabilitiesmovedtoUT• MobileRegionTypessupportedonDesktopUserInterface(since18.1):– ListView– ColumnToggleReport– ReflowReport
APEX18.1
24UniversalThemeAccessibilityImprovements
• Using<main>tagforbodycontent• FirstTABleadsto„skiptomaincontent“withkeyboard– Focusesoncontentandskipsnavigationbar
APEX19.1
25UniversalThemeNavigationStyles
• Newnavigationstyles• AfterUpgradetoUT1.3newoptioninuserinterface
APEX19.1
26UniversalThemeNavigationStyles
ClassicA(Defaultfornewapps)B
APEX19.1
27UniversalTheme-ThemeRollerProperties
18.219.1• Newpropertiesfor
Navigation:AccentandBadge
• HoverstateandMenualsoaffectsothercomponents
APEX19.1
28UniversalThemeUpgrade
• Version1.3available• OnlineUTsampleapplication– https://apex.oracle.com/ut
• Needstobeupgradedmanually
APEX19.1
29UniversalThemeUpgrade
APEX19.1
30UniversalThemeUpgrade
• Possiblyoutofsync:– Styles– Templates– TemplateOptions
• UpgraderequiredfornewfeaturesinUT/PageDesigner
APEX19.1
31Whichthemesrequireupgrade?–SQLQuery
SELECTworkspace,application_id,application_name,theme_name,file_prefix,is_currentFROMapex_application_themesWHEREreference_idISNOTNULL--stillsubscribed=>canberefreshedAND(theme_name='UniversalTheme'ORtheme_internal_name='UNIVERSAL_THEME')ORDERBYlast_updated_onDESCNULLSLAST
32
ApplicationBuilder
OtherFeatures
33Editingcustomattributesinlistsiseasier
Listshavecustomattributeswhichhaveadifferentmeaningbasedonthechosentemplate.Showingtheproperlabelsforcustomattributesmakeseditingeasier.
APEX19.1
34Editingcustomattributesinlistsiseasier
APEX19.1
35PageDesigner>staticlistofvalues
StaticlistofvaluesaresupportedbyadialoguePreviously(sorted):• STATIC:DisplayValue1[;ReturnValue1],DisplayValue2[;R
eturnValue2],...Orunsorted• STATIC2:DisplayValue1[;ReturnValue1],DisplayValue2[;
ReturnValue2],...Orreplaceseparatorsusingspecialcharacters• STATIC2(~,*):Aust,Dietmar*1~One;Two*2
APEX18.2
36PageDesigner>staticlistofvalues
APEX18.2
37GridEditTranslationsoptimized
Fortranslatedapplicationstheeditingdirectlyinthetranslationrepositoryhasbeenoptimized• SharedComponents>Globalization>TranslateApplication>TranslationRepository
APEX19.1
38GridEditTranslations…BEFORE19.1
APEX19.1
39GridEditTranslations…SINCE19.1
APEX19.1
40
ApplicationBuilder
DeveloperTools
41DeveloperTools–AutomaticDebugforExceptions
Whenanexceptionoccurs,debuginformationisavailableimmediatelyintheconsole.• Duringprocessingtheenginewillkeeptrackofminimalinformationaboutthecurrentexecutionstack.
• Ifanerroroccurs,thiswillberecordedinAPEX_DEBUG_MESSAGES.
• Ifyouareloggedinasadeveloper(thisisoptional)alinkwillbegeneratedtoaccessthedebugmessagesdirectly=>BrowserDeveloperConsole
APEX19.1
42DeveloperTools–AutomaticDebugforExceptions
APEX19.1
43DeveloperTools–APP_IDpartofAPEX$SESSION
• APEXsessioninformationprovidedthroughsys_context– UsedinViews/Triggersforperformanceinsteadofv()function
SELECTSYS_CONTEXT('APEX$SESSION','APP_USER')app_user,SYS_CONTEXT('APEX$SESSION','APP_SESSION')app_session,SYS_CONTEXT('APEX$SESSION','WORKSPACE_ID')workspace_id,SYS_CONTEXT('APEX$SESSION','APP_ID')app_idFROMDUAL
APEX19.1
44
ApplicationBuilder
CompatibilityMode
45CompatibilityMode
ThecompatibilitymodechangesthebehaviouroftheAPEXengineatruntime=>balancingnewfeatures/security/stricterchecksandeasyupgrades
46CompatibilityMode
Fulllistofchanges(frompreviousreleases)canbefoundintheCURRENTReleaseNoteshttps://docs.oracle.com/en/database/oracle/application-express/19.1/htmrn/index.html• CompatibilityModeChangesinMode4.1• CompatibilityModeChangesinMode4.2• CompatibilityModeChangesinMode5.0• CompatibilityModeChangesinMode5.1/18.1/18.2• CompatibilityModeChangesinMode19.1
47CompatibilityMode
• RichTexteditorenforcesthevalidationoftheMaxLengthitemattribute.
• WhenthelengthoftheHTMLmarkupexceedstheMaxLengthvalue,thesystemproducesanerrormessage.
APEX19.1
48CompatibilityMode
• Theerrormessagecanbechangedusingatextmessage:APEX.RICH_TEXT_EDITOR.MAXIMUM_LENGTH_EXCEEDED
APEX19.1
49CompatibilityMode-Query
SELECTworkspace,application_id,application_name,owner,compatibility_mode,last_updated_onFROMapex_applicationsORDERBYlast_updated_onDESC;
50
ApplicationBuilder
ItemsandRegions
51MaintainItemSessionState(inMemory)
SessionStateforItemscanbeusedinmemoryonly,notwrittentodiskatall.18.219.1
APEX19.1
52MaintainItemSessionState(inMemory)
• Benefits/Changes– Securitybenefit–requirementforPCIDSScompliance
– Fasterduringpagerenderingandprocessing• reducesI/Oonwwv_flow_data
– Thedefaultforpageitemsoftype"DBColumn"andwhicharenotthePKwillbe"PerRequest(MemoryOnly)".
APEX19.1
53InteractiveGridEnhancements
Additionaldeclarativeoptionsfortheinteractivegrid
APEX19.1
54InteractiveGridEnhancements
AdditionaldeclarativeoptionsforIGcolumns18.219.1
APEX19.1
55InteractiveGridEnhancements
APEX18.2
56InteractiveGridEnhancements
DynamicActionSetValueforMultipleIGColumns
APEX18.2
57
ApplicationBuilding
NewWizardGeneratedPages
58NewMasterDetail(sidebyside)
APEX18.2
59NewMasterDetail(sidebyside)
APEX18.2
60NewMasterDetail(sidebyside)
APEX18.2
61
SQLWorkshop
62RESTfulservices–easiernavigation
18.219.1• 18.1/18.2:Treealwaysfullyexpanded
• 19.1:rememberstreestate
APEX19.1
63SQLWorkshop>RESTenablement
AllowRESTEnablementofTABLES,VIEWS,PACKAGES,PROCEDURESandFUNCTIONS.
APEX19.1
64SQLWorkshop>SampleDatasets
APEX18.2
65SQLWorkshop>SampleDatasets
Fromthesampledatasetstheapplicationwizardcanbestarteddirectlynow
APEX18.2
66SQLWorkshop>SampleDatasets
Fromthesampledatasetstheapplicationwizardcanbestarteddirectlynow
APEX18.2
67SQLWorkshop>SampleDatasets
APEX18.2
68
PL/SQLAPIs
69PL/SQLAPIs
APEX_SESSIONSessionutils
testinginsqlplus/sqlclrunningapex_execinsqlplus/sqlcl
create_sessionhasnewparameter:p_call_post_authentication
APEX19.1
70PL/SQLAPIs
--initializesessionapex_util.set_security_group_id(apex_util.find_security_group_id('TRAINING'));apex_session.create_session(p_app_id=>1386,p_page_id=>4,p_username=>'DIETMAR.AUST',p_call_post_authentication=>true);--getvaluesfromsessionstateselectv('APP_ID')asapp_id,v('APP_SESSION')asapp_session,v('APP_USER')asapp_user,apex_app_setting.get_value(p_name=>'INSTANCE_TYPE')instance_typefromdual;--removesessionapex_session.delete_session(p_session_id=>nv('APP_SESSION'));
71PackageAPEX_DATA_PARSER
APEX_DATA_PARSERcsv/excel/json/icsparsing
discoverget_columnsget_file_profileget_file_typeget_xlsx_worksheetsjson_to_profileparse
APEX19.1
72PackageAPEX_DATA_PARSER
CarstenCzarski:“DataLoadingandDeepDiveintoAPEX_DATA_PARSER”
APEX19.1
73PL/SQLAPIs
APEX_EXECSQLExecution(mostly
remote),especiallyforplugin-developer
add_dml_rowclear_dml_rowscopy_dataexecute_dmlget_blobget_data_typeget_dml_status_codeget_dml_status_messageget_row_version_checksumhas_error…set_nullset_valueAPEX19.1
74PackageAPEX_EXEC
CarstenCzarski:“RESTServicesWithoutAPEX—ButwithAPEX_EXEC”
APEX19.1
75PL/SQLAPIs
APEX_STRINGgenericstring
operations
plist_push(addentries–nocheckforduplicates)plist_delete(removeinsteadofsettingtonull)--simplifymovingfromapex_util.string_to_tabletoapex_string--insteadofusingsplit()/join()string_to_tabletable_to_string
APEX19.1
76PL/SQLAPIs
APEX_THEMEapplication_idaddedas
parameter
set_current_styleset_session_styleset_session_style_css
APEX19.1
77ValidateORDSwhenupgradingAPEX–EveryTime!
APEX18.2
78
DeprecatedFeatures
79DeprecatedFeatures
• TeamDevelopmentDeprecated– TeamDevelopmentisdeprecatedasofthisrelease.Itwillberemovedinafuturerelease.
– Anewsystemtotrackfeedback,issues,andmilestoneswillreplaceit.
• OracleRESTDataServices(ORDS)-basedPrintingDeprecated
APEX19.1
80DeprecatedFeatures
• ThelegacyAnyChart,AnyMapandAnyGanttchartingcomponentsaredeprecatedasofthisrelease,andwillberemovedinafuturerelease.UsetheJETchartingsolutioninstead.– "SwitchingfromAnyCharttoJETChart"intheOracleApplicationExpressAppBuilderUser’sGuide
• CalendarPDFPrintingDeprecated– The"ExporttoPDF"functionalityoftheCSSCalendarregionisdeprecated.
APEX19.1
81
RemovedFeatures
82MobileUserInterfaces
Youcannotcreatenewpagesintheapplicationbuilderbecausethe„UserInterface“selectionhasbeenremoved
APEX18.2
83CommandLineTools
APEXExportSplitter.classremovedThe„-split“optionwasaddedtoAPEXExport.classFunctionAPEX_EXPORT.GET_APPLICATIONsupportsp_splitParameter.
APEX18.2
85
Backup
86FormRegionType
• NewRegionTypeassociatedtoadatasource
APEX19.1
87FormRegionType
• Items– havedatatypes(stillhavetouseto_number(:P10_ID)),– comefromdropdownlist– canbequeryonly.
APEX19.1
88FormRegionType
• Comeswithprocessestofetch/initialize
• Andprocessthedata
APEX19.1
89FormRegionType
• Regularformpagescanbeupgradedbytheupgradewizard
APEX19.1
90
ApplicationBuilder
CreateApplicationWizard
91CreateApplicationfromMSExcelFile
Improved“CreateAppfromSpreadsheet”wizard
Newfileformats– xlsx– json
APEX19.1
92CreateApplicationfromMSExcelFile
APEX19.1
93CreateApplicationfromMSExcelFile
APEX19.1
94CreateApplicationfromMSExcelFile
• SupportsmultipleSheetswithinaWorkbook
APEX19.1
95CreateApplicationfromMSExcelFile
• SupportsJSONfiles(inaflatstructure)
• WilltakefirstarrayinJSONobject
APEX19.1
96CreateApplicationfromMSExcelFile
• INSERTINTO...LOGERRORSintoExceptionTable• CurrentlyonlyINSERT,notMERGEsupported
APEX19.1
97PackageAPEX_DATA_PARSER
• Dynamicallyparsescsv/xlsx/json/icsfiles• SupportsthenewdialogsintheSQLWorkshopandCreateApplicationWizards=>everythingavailabletherecanbeimplemented
APEX19.1
98PackageAPEX_DATA_PARSER
• GET_FILE_TYPE– Detectsthefiletype
declarel_file_typeapex_data_parser.t_file_type;
beginl_file_type:=apex_data_parser.get_file_type('test.xlsx');
end;
APEX19.1
99PackageAPEX_DATA_PARSER
• GET_XLS_WORKSHEETS– Returnsallsheetswithinaxlsxworkbook
select*fromtable(apex_data_parser.get_xlsx_worksheets(p_content=>apex_web_service.make_rest_request_b('http://file-examples.com/wp-content/uploads/2017/02/file_example_XLSX_100.xlsx','GET')))
APEX19.1
100PackageAPEX_DATA_PARSER
• DISCOVER– Analysedataandcomputeadataprofile
SELECTapex_data_parser.discover(p_content=>l_file_blob,p_file_name=>'large.xlsx')FROMDUAL
APEX19.1
101PackageAPEX_DATA_PARSER
• GET_COLUMNS– Conveniencefunctiontoreturnthecolumnsofthedataprofile
APEX19.1
102PackageAPEX_DATA_PARSER
SELECT*FROMTABLE(apex_data_parser.get_columns(apex_data_parser.discover(p_content=>apex_web_service.make_rest_request_b('http://file-examples.com/wp-content/uploads/2017/02/file_example_XLSX_100.xlsx','GET'),p_file_name=>'large.xlsx')));
APEX19.1
103PackageAPEX_DATA_PARSER
• PARSE– Parsesthefile– Computesdataprofile– Returnstherawdata(basedonvarchar2(4000)cols)
APEX19.1
104PackageAPEX_DATA_PARSERSELECTline_number,col001,col002,col003,col004,col005,col006,col007FROMTABLE(wwv_flow_data_parser.parse(p_content=>apex_web_service.make_rest_request_b('http://file-examples.com/wp-content/uploads/2017/02/file_example_XLSX_100.xlsx','GET'),p_file_name=>'test.xlsx',p_xlsx_sheet_name=>'sheet1.xml'));
APEX19.1
105PackageAPEX_DATA_PARSER
• GET_FILE_PROFILE– Returnsthedataprofilefromthelastparse()ordiscover()call
APEX19.1
106PackageAPEX_DATA_PARSER
• Powerfulwaytoparsefiles(veryflexibleandfast)• Retrievesrawdata(varchar2(4000)),stillneedstobevalidatedandconvertedtorealdatatypes
APEX19.1
107JavascriptAPIs
• openDialog()/closeDialog()replaced• InlineRegionpopup
108
108