SlideShare a Scribd company logo
1 of 8
Custom UI5 Controls
Wrapping 3rd-Party Widgets*)
or: How to handle externally-managed HTML inside UI5 controls?
UI5ers live – April 2024
Andreas Kunz, SAP SE
*) like charts, maps, 3D viewers, editors, …
Any Web Widget Be Like…
„…gimme DOM element, I do magic!“
UI5 Rendering
apiVersion 1:
• rm.write("<someTag>bla</someTag>")
• Entire control HTML is removed and re-created from this string
apiVersion 2:
• rm.openStart("someTag") ...
• Control HTML is re-used and patched, but attributes/children added later are removed
apiVersion 4:
• Same, but different, but same: like apiVersion 2, but rendering needs to be independent from
parent control and non-owned HTML
• Control HTML remains untouched even when parent is re-rendered!
• …as long as your control handles all property/aggregation changes without invalidation
• AND parent controls have apiVersion 2+ (granted with UI5 2.x)
• AND any contained child controls have apiVersion 4
• AND any onBefore/AfterRendering event delegates added by application code sets the canSkipRendering flag
• AND maybe some other conditions
BAM!
BAM!
BAM!
sap.ui.core.HTML to the Rescue
Content moved away during rendering and restored afterwards:
Basic usage: https://jsbin.com/ragukag/edit?html,output
Hint: do NOT set different IDs for control and content element! (only one)
Example
OpenStreetMap control using https://leafletjs.com
https://jsbin.com/fibusug/edit?html,output
(based on a sample shown at the very first UI5con)
1
2
3
4
5
What happens exactly?
a) If parent HBox is re-rendered: control DOM is not touched at all, thanks to
apiVersion:4.
With apiVersion:2 or 1, the control is re-rendered and the HTML control does its „preserve“ magic.
b) If „zoom“ property is changed: setZoom(…) prevents invalidation and
updates the map directly – DOM is not touched otherwise.
c) If „latitude“ or “longitude“ property is changed: the control is
invalidated and re-rendered and the HTML control does its „preserve“
magic.
Thank you!
Andreas Kunz

More Related Content

Similar to UI5ers live - Custom Controls wrapping 3rd-party libs.pptx

IBM Lotusphere 2011 AD306 - IBM Lotus Sametime Proxy: A Collaborative Recipe...
IBM Lotusphere 2011 AD306 - IBM Lotus Sametime Proxy:  A Collaborative Recipe...IBM Lotusphere 2011 AD306 - IBM Lotus Sametime Proxy:  A Collaborative Recipe...
IBM Lotusphere 2011 AD306 - IBM Lotus Sametime Proxy: A Collaborative Recipe...William Holmes
 
IBM i Encryption Made Easy
IBM i Encryption Made EasyIBM i Encryption Made Easy
IBM i Encryption Made EasyPrecisely
 
Ivan Danilov «Desktop Application Automation: .NET Developer’s Perspective»
Ivan Danilov «Desktop Application Automation: .NET Developer’s Perspective»Ivan Danilov «Desktop Application Automation: .NET Developer’s Perspective»
Ivan Danilov «Desktop Application Automation: .NET Developer’s Perspective»LogeekNightUkraine
 
Victor Toal - IBM Connections: So you have it installed – now what?
Victor Toal - IBM Connections: So you have it installed – now what?Victor Toal - IBM Connections: So you have it installed – now what?
Victor Toal - IBM Connections: So you have it installed – now what?LetsConnect
 
An Introduction to the Model-View-Controller Pattern
An Introduction to the Model-View-Controller PatternAn Introduction to the Model-View-Controller Pattern
An Introduction to the Model-View-Controller PatternTeamstudio
 
Seal, Personalize and Automate your WVD Images using a validated vendor best ...
Seal, Personalize and Automate your WVD Images using a validated vendor best ...Seal, Personalize and Automate your WVD Images using a validated vendor best ...
Seal, Personalize and Automate your WVD Images using a validated vendor best ...Matthias Schlimm
 
Launching Activiti v6 (Activiti Community Day Paris 2015)
Launching Activiti v6 (Activiti Community Day Paris 2015) Launching Activiti v6 (Activiti Community Day Paris 2015)
Launching Activiti v6 (Activiti Community Day Paris 2015) Joram Barrez
 
IBM Lotus Notes Client Management Done Right – Beginning to End
IBM Lotus Notes Client Management Done Right – Beginning to EndIBM Lotus Notes Client Management Done Right – Beginning to End
IBM Lotus Notes Client Management Done Right – Beginning to Endpanagenda
 
Radu vunvulea building and testing windows 8 metro style applications using ...
Radu vunvulea  building and testing windows 8 metro style applications using ...Radu vunvulea  building and testing windows 8 metro style applications using ...
Radu vunvulea building and testing windows 8 metro style applications using ...Radu Vunvulea
 
Drupal 8 deeper dive
Drupal 8 deeper diveDrupal 8 deeper dive
Drupal 8 deeper diveAmazee Labs
 
Create your own control - UI5Con
Create your own control - UI5ConCreate your own control - UI5Con
Create your own control - UI5ConWouter Lemaire
 
West Coast DevCon 2014: Engine Overview - A Programmers Glimpse at UE4
West Coast DevCon 2014: Engine Overview - A Programmers Glimpse at UE4West Coast DevCon 2014: Engine Overview - A Programmers Glimpse at UE4
West Coast DevCon 2014: Engine Overview - A Programmers Glimpse at UE4Gerke Max Preussner
 
Getting started with Xamarin forms
Getting started with Xamarin formsGetting started with Xamarin forms
Getting started with Xamarin formsSolTech, Inc.
 
Symfony2 for legacy app rejuvenation: the eZ Publish case study
Symfony2 for legacy app rejuvenation: the eZ Publish case studySymfony2 for legacy app rejuvenation: the eZ Publish case study
Symfony2 for legacy app rejuvenation: the eZ Publish case studyGaetano Giunta
 
TomaszPoszytek_ALM-Fundamentals_SS2023.pdf
TomaszPoszytek_ALM-Fundamentals_SS2023.pdfTomaszPoszytek_ALM-Fundamentals_SS2023.pdf
TomaszPoszytek_ALM-Fundamentals_SS2023.pdfTomasz Poszytek
 
AWS re:Invent 2013 - MBL303 Gaming Ops - Running High-performance Ops for Mob...
AWS re:Invent 2013 - MBL303 Gaming Ops - Running High-performance Ops for Mob...AWS re:Invent 2013 - MBL303 Gaming Ops - Running High-performance Ops for Mob...
AWS re:Invent 2013 - MBL303 Gaming Ops - Running High-performance Ops for Mob...Eduardo Saito
 

Similar to UI5ers live - Custom Controls wrapping 3rd-party libs.pptx (20)

44c
44c44c
44c
 
IBM Lotusphere 2011 AD306 - IBM Lotus Sametime Proxy: A Collaborative Recipe...
IBM Lotusphere 2011 AD306 - IBM Lotus Sametime Proxy:  A Collaborative Recipe...IBM Lotusphere 2011 AD306 - IBM Lotus Sametime Proxy:  A Collaborative Recipe...
IBM Lotusphere 2011 AD306 - IBM Lotus Sametime Proxy: A Collaborative Recipe...
 
IBM i Encryption Made Easy
IBM i Encryption Made EasyIBM i Encryption Made Easy
IBM i Encryption Made Easy
 
Ivan Danilov «Desktop Application Automation: .NET Developer’s Perspective»
Ivan Danilov «Desktop Application Automation: .NET Developer’s Perspective»Ivan Danilov «Desktop Application Automation: .NET Developer’s Perspective»
Ivan Danilov «Desktop Application Automation: .NET Developer’s Perspective»
 
Victor Toal - IBM Connections: So you have it installed – now what?
Victor Toal - IBM Connections: So you have it installed – now what?Victor Toal - IBM Connections: So you have it installed – now what?
Victor Toal - IBM Connections: So you have it installed – now what?
 
An Introduction to the Model-View-Controller Pattern
An Introduction to the Model-View-Controller PatternAn Introduction to the Model-View-Controller Pattern
An Introduction to the Model-View-Controller Pattern
 
Seal, Personalize and Automate your WVD Images using a validated vendor best ...
Seal, Personalize and Automate your WVD Images using a validated vendor best ...Seal, Personalize and Automate your WVD Images using a validated vendor best ...
Seal, Personalize and Automate your WVD Images using a validated vendor best ...
 
Building APIs with Mule and Spring Boot
Building APIs with Mule and Spring BootBuilding APIs with Mule and Spring Boot
Building APIs with Mule and Spring Boot
 
Launching Activiti v6 (Activiti Community Day Paris 2015)
Launching Activiti v6 (Activiti Community Day Paris 2015) Launching Activiti v6 (Activiti Community Day Paris 2015)
Launching Activiti v6 (Activiti Community Day Paris 2015)
 
IBM Lotus Notes Client Management Done Right – Beginning to End
IBM Lotus Notes Client Management Done Right – Beginning to EndIBM Lotus Notes Client Management Done Right – Beginning to End
IBM Lotus Notes Client Management Done Right – Beginning to End
 
Radu vunvulea building and testing windows 8 metro style applications using ...
Radu vunvulea  building and testing windows 8 metro style applications using ...Radu vunvulea  building and testing windows 8 metro style applications using ...
Radu vunvulea building and testing windows 8 metro style applications using ...
 
Web Components, O Drupal está preparado?
Web Components, O Drupal está preparado?Web Components, O Drupal está preparado?
Web Components, O Drupal está preparado?
 
Drupal 8 deeper dive
Drupal 8 deeper diveDrupal 8 deeper dive
Drupal 8 deeper dive
 
Create your own control - UI5Con
Create your own control - UI5ConCreate your own control - UI5Con
Create your own control - UI5Con
 
West Coast DevCon 2014: Engine Overview - A Programmers Glimpse at UE4
West Coast DevCon 2014: Engine Overview - A Programmers Glimpse at UE4West Coast DevCon 2014: Engine Overview - A Programmers Glimpse at UE4
West Coast DevCon 2014: Engine Overview - A Programmers Glimpse at UE4
 
3 Review
3 Review3 Review
3 Review
 
Getting started with Xamarin forms
Getting started with Xamarin formsGetting started with Xamarin forms
Getting started with Xamarin forms
 
Symfony2 for legacy app rejuvenation: the eZ Publish case study
Symfony2 for legacy app rejuvenation: the eZ Publish case studySymfony2 for legacy app rejuvenation: the eZ Publish case study
Symfony2 for legacy app rejuvenation: the eZ Publish case study
 
TomaszPoszytek_ALM-Fundamentals_SS2023.pdf
TomaszPoszytek_ALM-Fundamentals_SS2023.pdfTomaszPoszytek_ALM-Fundamentals_SS2023.pdf
TomaszPoszytek_ALM-Fundamentals_SS2023.pdf
 
AWS re:Invent 2013 - MBL303 Gaming Ops - Running High-performance Ops for Mob...
AWS re:Invent 2013 - MBL303 Gaming Ops - Running High-performance Ops for Mob...AWS re:Invent 2013 - MBL303 Gaming Ops - Running High-performance Ops for Mob...
AWS re:Invent 2013 - MBL303 Gaming Ops - Running High-performance Ops for Mob...
 

Recently uploaded

Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...kellynguyen01
 
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfThe Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfkalichargn70th171
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsJhone kinadey
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...gurkirankumar98700
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software DevelopersVinodh Ram
 
why an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfwhy an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfjoe51371421
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxbodapatigopi8531
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackVICTOR MAESTRE RAMIREZ
 
DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about usDynamic Netsoft
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...stazi3110
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...MyIntelliSource, Inc.
 
Project Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanationProject Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanationkaushalgiri8080
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfkalichargn70th171
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsAndolasoft Inc
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsArshad QA
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comFatema Valibhai
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...OnePlan Solutions
 
Test Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and BackendTest Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and BackendArshad QA
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxComplianceQuest1
 
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️anilsa9823
 

Recently uploaded (20)

Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
 
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfThe Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial Goals
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software Developers
 
why an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfwhy an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdf
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptx
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStack
 
DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about us
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
 
Project Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanationProject Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanation
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.js
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
 
Test Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and BackendTest Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and Backend
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docx
 
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
 

UI5ers live - Custom Controls wrapping 3rd-party libs.pptx

  • 1. Custom UI5 Controls Wrapping 3rd-Party Widgets*) or: How to handle externally-managed HTML inside UI5 controls? UI5ers live – April 2024 Andreas Kunz, SAP SE *) like charts, maps, 3D viewers, editors, …
  • 2. Any Web Widget Be Like… „…gimme DOM element, I do magic!“
  • 3. UI5 Rendering apiVersion 1: • rm.write("<someTag>bla</someTag>") • Entire control HTML is removed and re-created from this string apiVersion 2: • rm.openStart("someTag") ... • Control HTML is re-used and patched, but attributes/children added later are removed apiVersion 4: • Same, but different, but same: like apiVersion 2, but rendering needs to be independent from parent control and non-owned HTML • Control HTML remains untouched even when parent is re-rendered! • …as long as your control handles all property/aggregation changes without invalidation • AND parent controls have apiVersion 2+ (granted with UI5 2.x) • AND any contained child controls have apiVersion 4 • AND any onBefore/AfterRendering event delegates added by application code sets the canSkipRendering flag • AND maybe some other conditions BAM! BAM! BAM!
  • 4. sap.ui.core.HTML to the Rescue Content moved away during rendering and restored afterwards: Basic usage: https://jsbin.com/ragukag/edit?html,output Hint: do NOT set different IDs for control and content element! (only one)
  • 5. Example OpenStreetMap control using https://leafletjs.com https://jsbin.com/fibusug/edit?html,output (based on a sample shown at the very first UI5con)
  • 7. What happens exactly? a) If parent HBox is re-rendered: control DOM is not touched at all, thanks to apiVersion:4. With apiVersion:2 or 1, the control is re-rendered and the HTML control does its „preserve“ magic. b) If „zoom“ property is changed: setZoom(…) prevents invalidation and updates the map directly – DOM is not touched otherwise. c) If „latitude“ or “longitude“ property is changed: the control is invalidated and re-rendered and the HTML control does its „preserve“ magic.

Editor's Notes

  1. https://jsbin.com/fibusug/edit?html,output (full sample) Simple: https://jsbin.com/bizahik/edit?html,output