founding member (2010) • Oracle since 2002 (Oracle 8i) • PL/SQL, Apex, HTML(5), CSS(3), JavaScript, XML, XSLT • Special interest in UI • Trainer at skillbuilders.com • RIMA on Oracle Forums @rhjmartens richardmartens.blogspot.nl Richard Martens
SQL • (no) Rows • Expression – PL/SQL • Expression • Error • Function body (Boolean / error-text) – Item comparison • (not) Null or zero • (not) Contains something • IS (not) a value • Regular Expression – Validations pass when the validation is “true” 6 MOSTLY used
for page item • page vs item validations Tabular Form validations • reference column using :BIND notation for column or pageitem • row vs column validations 7
Column constraints (not null) – Advantage: easy to maintain at table definition – Disadvantage: cannot use your own code • Using triggers – Advantage: • Can use PLSQL code • Before / After / Statement triggers – Disadvantages • Not as easy to maintain • Error handling function cannot focus on element by default (must write specific plsql code) • Use apex’s “Error handling function” to get meaningful error messages 8
Map ORA messages to meaningful messages • When check constraint, the element automatically gets selected in the form • Can utilize error messages thrown by triggers (no automatic element-selection) 9
rendering of keyboard on mobile devices – http://html5doctor.com/html5-forms-input-types/ • Apex does not support all types – only text, email, phone-number and url – other types by using a dynamic action to overwrite the “type” attribute • Uses elements attributes – type • color / date / datetime / datetime-local / email / month / number / range / search / tel / time / url / week – autocomplete – formnovalidate – list – min and max – multiple (email / file) – pattern (regexp) – placeholder – required – step – <form> autocomplete – <form> novalidate 11
not enforcing • But you can write JavaScript for that – pro: built into the browser, no installation required and backwards compatible – pro: can use CSS to style element 12