SlideShare a Scribd company logo
1 of 20
Workshop track 
Content editor and PDF 
extensions in 9.5 
Georg Westenberger, Alkacon Software 
27.11.2014
● PDF extensions 
● Generating PDFs from XML contents 
● Generating thumbnails for PDFs 
● Content editor extensions 
● Locale synchronization 
● Visibility handlers 
● Change handlers 
2 
Overview
● Generate PDFs from XML contents 
● Write a JSP to generate XHTML which is then 
converted to PDF using the flying-saucer library 
● See code.google.com/p/flying-saucer/ for more 
info on the library. 
● PDFs are not stored in VFS, but generated on 
the fly when a special PDF link is used 
3 
PDF Generation
Demo Demo 
● Live Demo 
4 
PDF Generation 
Demo 
Demo 
デモ
● Step 1: Write a JSP to generate XHTML from 
your XML content 
● Step 2: Generate a PDF link with the 
<cms:pdf> tag 
● <cms:pdf 
format='/system/modules/com.alkacon.bootstrap.formatters/pages/blog 
-pdf.jsp' 
content='${content.filename}' locale='en'/>" 
5 
PDF Generation – how to use
● Generate thumbnails for PDFs in various formats 
● <cms:pdfthumbnail format=„png“ file=„/my-document. 
pdf“ width=„50“ /> 
● format: format for the thumbnails, use ‚png‘ or ‚jpg‘ 
● file: the path of the PDF for which to generate the 
thumbnail 
● width / height: At least one of these need to be 
set, determines dimensions of thumbnail 
● PDF thumbnails are cached on the server file 
system 
6 
PDF thumbnails
Demo Demo 
● Live Demo 
7 
PDF thumbnails 
Demo 
Demo 
デモ
● These only work with the XML content editor 
introduced in OpenCms 8.5, not with the older 
XML content editor or any other way of editing 
XML contents 
● Example: Type bs-image in the demo 
8 
Notes on the content editor 
enhancements
● Sometimes, no localization is needed for some 
values in an XML content 
● For example: IDs (product ID,…), images, 
configuration data 
● Make selected fields locale-independent 
● For any change made in the editor, the field 
value is updated in all other locales 
9 
Locale synchronization
Demo Demo 
● Live Demo 
10 
Locale synchronization 
Demo 
Demo 
デモ
● Configure in XSD schema 
● Example image.xsd: 
<xsd:sequence> 
… 
<xsd:element name="Headline" type="OpenCmsString" /> 
<xsd:element name="Image" type="OpenCmsVfsFile" /> 
… 
</xsd:sequence> 
… 
<synchronizations> 
<synchronization element="Image" /> 
</synchronizations> 
11 
Locale synchronization
● Hide content fields from the user dynamically 
● Visibility is determined by custom Java class 
● Example: hide cryptic status / configuration 
values from normal users, restrict them to 
admins. 
12 
Field visibility handlers
Demo Demo 
● Live Demo 
13 
Field visibility handlers 
Demo 
Demo 
デモ
● Configure in XSD schema: 
<visibilities> 
<visibility 
element="GalleryTitle" 
params="ROLE.GALLERY_EDITOR" /> 
<visibility 
element=“OtherField" 
class=“my.custom.VisibilityHandler” 
params=“parameters for my custom class" /> 
</visibilities> 
● element: The field being checked for visibility 
● class: The Java class responsible for deciding whether the field is 
visible 
● params: Configuration string passed to the Java class 
14 
Field visibility handlers
● Visibility handler class: 
class MyVisibilityHandler implements 
I_CmsXmlContentVisibilityHandler { 
public boolean isValueVisible( 
CmsObject cms, 
I_CmsXmlSchemaType value, 
String elementPath, 
String params, 
CmsResource resource, 
Locale contentLocale) { 
return true; 
} 
} 
15 
Field visibility handlers
● Basic idea: Automatically update other fields 
when a given field is changed 
● Example: Updating a content field from a 
property of a linked image 
16 
Dynamic field handlers
<editorchangehandlers> 
<editorchangehandler 
class="org.opencms.ade.contenteditor.CmsEditorChang 
eHandlerProperty" 
scope="Image" 
configuration="Copyright|../Copyright" /> 
</editorchangehandlers> 
● class : Custom Java class to process changes 
● scope : Path of the field which is watched for changes 
● configuration : Configuration string passed to the change handler class 
17 
Dynamic field handlers
● Extend 
A_CmsXmlContentEditorChangeHandler and 
implement these methods: 
public CmsXmlContent handleChange( 
CmsObject cms, 
CmsXmlContent content, 
Locale locale, 
Collection<String> changedPaths) 
public void setConfiguration(String configuration) 
Note: The return value of handleChange is not used, modify the 
CmsXmlContent parameter directly instead 
18 
Dynamic field handlers
● Any Questions? 
19 
Any Questions? 
Fragen? 
Questions ? 
質問¿Preguntas? 
Questiones?
Thank you very much for your 
attention! 
Georg Westenberger 
Alkacon Software GmbH 
http://www.alkacon.com 
http://www.opencms.org 
20

More Related Content

What's hot

OpenCms Days 2015: Keynote - OpenCms 10 X marks the spot
OpenCms Days 2015: Keynote - OpenCms 10 X marks the spotOpenCms Days 2015: Keynote - OpenCms 10 X marks the spot
OpenCms Days 2015: Keynote - OpenCms 10 X marks the spotOpenCms
 
Post-relational databases: What's wrong with web development?
Post-relational databases: What's wrong with web development?Post-relational databases: What's wrong with web development?
Post-relational databases: What's wrong with web development?Dobrica Pavlinušić
 
Drupal and communication
Drupal and communicationDrupal and communication
Drupal and communicationPeter Arato
 
Easy Drupal Project Deployment With Features Module & Drush
Easy Drupal Project Deployment With Features Module & DrushEasy Drupal Project Deployment With Features Module & Drush
Easy Drupal Project Deployment With Features Module & DrushQArea
 
Hyperfun with hyperloop - Ihor Strumetskyi
Hyperfun with hyperloop - Ihor StrumetskyiHyperfun with hyperloop - Ihor Strumetskyi
Hyperfun with hyperloop - Ihor StrumetskyiRuby Meditation
 
Introduction to Ember.js
Introduction to Ember.jsIntroduction to Ember.js
Introduction to Ember.jsVinoth Kumar
 
Design Summit - Automate roadmap - Madhu Kanoor
Design Summit - Automate roadmap - Madhu KanoorDesign Summit - Automate roadmap - Madhu Kanoor
Design Summit - Automate roadmap - Madhu KanoorManageIQ
 
Web Assembly Big Picture
Web Assembly Big PictureWeb Assembly Big Picture
Web Assembly Big PictureYousif Shalaby
 
Free Online SharePoint Framework Webinar
Free Online SharePoint Framework WebinarFree Online SharePoint Framework Webinar
Free Online SharePoint Framework WebinarManoj Mittal
 

What's hot (15)

OpenCms Days 2015: Keynote - OpenCms 10 X marks the spot
OpenCms Days 2015: Keynote - OpenCms 10 X marks the spotOpenCms Days 2015: Keynote - OpenCms 10 X marks the spot
OpenCms Days 2015: Keynote - OpenCms 10 X marks the spot
 
Post-relational databases: What's wrong with web development?
Post-relational databases: What's wrong with web development?Post-relational databases: What's wrong with web development?
Post-relational databases: What's wrong with web development?
 
Drupal and communication
Drupal and communicationDrupal and communication
Drupal and communication
 
Easy Drupal Project Deployment With Features Module & Drush
Easy Drupal Project Deployment With Features Module & DrushEasy Drupal Project Deployment With Features Module & Drush
Easy Drupal Project Deployment With Features Module & Drush
 
Hyperfun with hyperloop - Ihor Strumetskyi
Hyperfun with hyperloop - Ihor StrumetskyiHyperfun with hyperloop - Ihor Strumetskyi
Hyperfun with hyperloop - Ihor Strumetskyi
 
Getting started with angular js
Getting started with angular jsGetting started with angular js
Getting started with angular js
 
ADOBE CQ5 DEVELOPER ONLINE TRAINING
ADOBE CQ5 DEVELOPER ONLINE TRAININGADOBE CQ5 DEVELOPER ONLINE TRAINING
ADOBE CQ5 DEVELOPER ONLINE TRAINING
 
Routing
RoutingRouting
Routing
 
OpenCms Days 2015 How do you develop for OpenCms?
OpenCms Days 2015 How do you develop for OpenCms?OpenCms Days 2015 How do you develop for OpenCms?
OpenCms Days 2015 How do you develop for OpenCms?
 
Introduction to Ember.js
Introduction to Ember.jsIntroduction to Ember.js
Introduction to Ember.js
 
Design Summit - Automate roadmap - Madhu Kanoor
Design Summit - Automate roadmap - Madhu KanoorDesign Summit - Automate roadmap - Madhu Kanoor
Design Summit - Automate roadmap - Madhu Kanoor
 
How browser work
How browser workHow browser work
How browser work
 
Web Assembly Big Picture
Web Assembly Big PictureWeb Assembly Big Picture
Web Assembly Big Picture
 
Free Online SharePoint Framework Webinar
Free Online SharePoint Framework WebinarFree Online SharePoint Framework Webinar
Free Online SharePoint Framework Webinar
 
Into to drupal8
Into to drupal8Into to drupal8
Into to drupal8
 

Similar to OpenCms Days 2014 - OpenCms content editor and pdf extensions

OpenCms Days 2012 - OpenCms 8.5: Creating "in place" editable pages with the ...
OpenCms Days 2012 - OpenCms 8.5: Creating "in place" editable pages with the ...OpenCms Days 2012 - OpenCms 8.5: Creating "in place" editable pages with the ...
OpenCms Days 2012 - OpenCms 8.5: Creating "in place" editable pages with the ...Alkacon Software GmbH & Co. KG
 
Presentation on angular 5
Presentation on angular 5Presentation on angular 5
Presentation on angular 5Ramesh Adhikari
 
Thinking in Components
Thinking in ComponentsThinking in Components
Thinking in ComponentsAnton Ivanov
 
HTML, CSS & Javascript Architecture (extended version) - Jan Kraus
HTML, CSS & Javascript Architecture (extended version) - Jan KrausHTML, CSS & Javascript Architecture (extended version) - Jan Kraus
HTML, CSS & Javascript Architecture (extended version) - Jan KrausWomen in Technology Poland
 
Social Connections VI — IBM Connections Extensions and Themes Demystified
Social Connections VI — IBM Connections Extensions and Themes DemystifiedSocial Connections VI — IBM Connections Extensions and Themes Demystified
Social Connections VI — IBM Connections Extensions and Themes DemystifiedClaudio Procida
 
OpenCms Days 2015 Modern templates with nested containers
OpenCms Days 2015 Modern templates with nested containersOpenCms Days 2015 Modern templates with nested containers
OpenCms Days 2015 Modern templates with nested containersAlkacon Software GmbH & Co. KG
 
Guvnor presentation jervis liu
Guvnor presentation jervis liuGuvnor presentation jervis liu
Guvnor presentation jervis liujbossug
 
Gutenberg Extended
Gutenberg ExtendedGutenberg Extended
Gutenberg ExtendedSören Wrede
 
JavaLand 2014 - Ankor.io Presentation
JavaLand 2014 - Ankor.io PresentationJavaLand 2014 - Ankor.io Presentation
JavaLand 2014 - Ankor.io Presentationmanolitto
 
Meetup - Getting Started with MVVM Light for WPF - 11 may 2019
Meetup  - Getting Started with MVVM Light for WPF - 11 may 2019Meetup  - Getting Started with MVVM Light for WPF - 11 may 2019
Meetup - Getting Started with MVVM Light for WPF - 11 may 2019iFour Technolab Pvt. Ltd.
 
JahiaOne - Advanced modules - choose the right strategy
JahiaOne - Advanced modules - choose the right strategyJahiaOne - Advanced modules - choose the right strategy
JahiaOne - Advanced modules - choose the right strategyJahia Solutions Group
 

Similar to OpenCms Days 2014 - OpenCms content editor and pdf extensions (20)

Webrender 1.0
Webrender 1.0Webrender 1.0
Webrender 1.0
 
OpenCms Days 2012 - OpenCms 8.5: Creating "in place" editable pages with the ...
OpenCms Days 2012 - OpenCms 8.5: Creating "in place" editable pages with the ...OpenCms Days 2012 - OpenCms 8.5: Creating "in place" editable pages with the ...
OpenCms Days 2012 - OpenCms 8.5: Creating "in place" editable pages with the ...
 
Presentation on angular 5
Presentation on angular 5Presentation on angular 5
Presentation on angular 5
 
OpenCms Days 2014 Keynote - Step up to OpenCms 9.5
OpenCms Days 2014 Keynote - Step up to OpenCms 9.5OpenCms Days 2014 Keynote - Step up to OpenCms 9.5
OpenCms Days 2014 Keynote - Step up to OpenCms 9.5
 
Thinking in Components
Thinking in ComponentsThinking in Components
Thinking in Components
 
OpenCms Days 2015 Hidden features of OpenCms
OpenCms Days 2015 Hidden features of OpenCmsOpenCms Days 2015 Hidden features of OpenCms
OpenCms Days 2015 Hidden features of OpenCms
 
HTML, CSS & Javascript Architecture (extended version) - Jan Kraus
HTML, CSS & Javascript Architecture (extended version) - Jan KrausHTML, CSS & Javascript Architecture (extended version) - Jan Kraus
HTML, CSS & Javascript Architecture (extended version) - Jan Kraus
 
OpenCms Days 2014 - Nested containers in action
OpenCms Days 2014 - Nested containers in actionOpenCms Days 2014 - Nested containers in action
OpenCms Days 2014 - Nested containers in action
 
FrontEnd.pdf
FrontEnd.pdfFrontEnd.pdf
FrontEnd.pdf
 
Social Connections VI — IBM Connections Extensions and Themes Demystified
Social Connections VI — IBM Connections Extensions and Themes DemystifiedSocial Connections VI — IBM Connections Extensions and Themes Demystified
Social Connections VI — IBM Connections Extensions and Themes Demystified
 
An Intro into webpack
An Intro into webpackAn Intro into webpack
An Intro into webpack
 
OpenCms Days 2015 Modern templates with nested containers
OpenCms Days 2015 Modern templates with nested containersOpenCms Days 2015 Modern templates with nested containers
OpenCms Days 2015 Modern templates with nested containers
 
Guvnor presentation jervis liu
Guvnor presentation jervis liuGuvnor presentation jervis liu
Guvnor presentation jervis liu
 
Gutenberg Extended
Gutenberg ExtendedGutenberg Extended
Gutenberg Extended
 
OpenCms Days 2014 - Updating to OpenCms 9.5
OpenCms Days 2014 - Updating to OpenCms 9.5OpenCms Days 2014 - Updating to OpenCms 9.5
OpenCms Days 2014 - Updating to OpenCms 9.5
 
JavaLand 2014 - Ankor.io Presentation
JavaLand 2014 - Ankor.io PresentationJavaLand 2014 - Ankor.io Presentation
JavaLand 2014 - Ankor.io Presentation
 
Meetup - Getting Started with MVVM Light for WPF - 11 may 2019
Meetup  - Getting Started with MVVM Light for WPF - 11 may 2019Meetup  - Getting Started with MVVM Light for WPF - 11 may 2019
Meetup - Getting Started with MVVM Light for WPF - 11 may 2019
 
Grails 101
Grails 101Grails 101
Grails 101
 
JahiaOne - Advanced modules - choose the right strategy
JahiaOne - Advanced modules - choose the right strategyJahiaOne - Advanced modules - choose the right strategy
JahiaOne - Advanced modules - choose the right strategy
 
Session-4.pptx
Session-4.pptxSession-4.pptx
Session-4.pptx
 

More from Alkacon Software GmbH & Co. KG

OpenCms Days 2016: Participation and transparency portals with OpenCms
OpenCms Days 2016: Participation and transparency portals with OpenCmsOpenCms Days 2016: Participation and transparency portals with OpenCms
OpenCms Days 2016: Participation and transparency portals with OpenCmsAlkacon Software GmbH & Co. KG
 
OpenCms Days 2016: OpenCms at the swiss seismological service
OpenCms Days 2016: OpenCms at the swiss seismological serviceOpenCms Days 2016: OpenCms at the swiss seismological service
OpenCms Days 2016: OpenCms at the swiss seismological serviceAlkacon Software GmbH & Co. KG
 
OpenCms Days 2016: Next generation content repository
OpenCms Days 2016: Next generation content repository OpenCms Days 2016: Next generation content repository
OpenCms Days 2016: Next generation content repository Alkacon Software GmbH & Co. KG
 
OpenCms Days 2014 - How Techem handles international customer portals
OpenCms Days 2014 - How Techem handles international customer portalsOpenCms Days 2014 - How Techem handles international customer portals
OpenCms Days 2014 - How Techem handles international customer portalsAlkacon Software GmbH & Co. KG
 
OpenCms Days 2014 - OpenCms cloud setup with the FI-TS
OpenCms Days 2014 - OpenCms cloud setup with the FI-TSOpenCms Days 2014 - OpenCms cloud setup with the FI-TS
OpenCms Days 2014 - OpenCms cloud setup with the FI-TSAlkacon Software GmbH & Co. KG
 
OpenCms Days 2014 - OpenCms Module Development and Deployment with IntelliJ, ...
OpenCms Days 2014 - OpenCms Module Development and Deployment with IntelliJ, ...OpenCms Days 2014 - OpenCms Module Development and Deployment with IntelliJ, ...
OpenCms Days 2014 - OpenCms Module Development and Deployment with IntelliJ, ...Alkacon Software GmbH & Co. KG
 
OpenCms Days 2014 - User Generated Content in OpenCms 9.5
OpenCms Days 2014 - User Generated Content in OpenCms 9.5OpenCms Days 2014 - User Generated Content in OpenCms 9.5
OpenCms Days 2014 - User Generated Content in OpenCms 9.5Alkacon Software GmbH & Co. KG
 
OpenCms Days 2014 - Introducing the 9.5 OpenCms documentation
OpenCms Days 2014 - Introducing the 9.5 OpenCms documentationOpenCms Days 2014 - Introducing the 9.5 OpenCms documentation
OpenCms Days 2014 - Introducing the 9.5 OpenCms documentationAlkacon Software GmbH & Co. KG
 

More from Alkacon Software GmbH & Co. KG (20)

OpenCms Days 2016: Multilingual websites with OpenCms
OpenCms Days 2016:   Multilingual websites with OpenCmsOpenCms Days 2016:   Multilingual websites with OpenCms
OpenCms Days 2016: Multilingual websites with OpenCms
 
OpenCms Days 2016: Participation and transparency portals with OpenCms
OpenCms Days 2016: Participation and transparency portals with OpenCmsOpenCms Days 2016: Participation and transparency portals with OpenCms
OpenCms Days 2016: Participation and transparency portals with OpenCms
 
OpenCms Days 2016: OpenCms at the swiss seismological service
OpenCms Days 2016: OpenCms at the swiss seismological serviceOpenCms Days 2016: OpenCms at the swiss seismological service
OpenCms Days 2016: OpenCms at the swiss seismological service
 
OpenCms Days 2016: Next generation content repository
OpenCms Days 2016: Next generation content repository OpenCms Days 2016: Next generation content repository
OpenCms Days 2016: Next generation content repository
 
OpenCms Days 2016: Keynote - Introducing OpenCms 10.5
OpenCms Days 2016:   Keynote - Introducing OpenCms 10.5OpenCms Days 2016:   Keynote - Introducing OpenCms 10.5
OpenCms Days 2016: Keynote - Introducing OpenCms 10.5
 
OpenCms Days 2015 OpenCms X marks the spot
OpenCms Days 2015 OpenCms X marks the spotOpenCms Days 2015 OpenCms X marks the spot
OpenCms Days 2015 OpenCms X marks the spot
 
OpenCms Days 2015 Next generation repository
OpenCms Days 2015  Next generation repositoryOpenCms Days 2015  Next generation repository
OpenCms Days 2015 Next generation repository
 
OpenCms Days 2015 OCEE explained
OpenCms Days 2015 OCEE explainedOpenCms Days 2015 OCEE explained
OpenCms Days 2015 OCEE explained
 
OpenCms Days 2015 Advanced Solr Searching
OpenCms Days 2015 Advanced Solr SearchingOpenCms Days 2015 Advanced Solr Searching
OpenCms Days 2015 Advanced Solr Searching
 
OpenCms Days 2015 OpenGovernment
OpenCms Days 2015 OpenGovernmentOpenCms Days 2015 OpenGovernment
OpenCms Days 2015 OpenGovernment
 
OpenCms Days 2015 OpenCms at erarta
OpenCms Days 2015 OpenCms at erarta OpenCms Days 2015 OpenCms at erarta
OpenCms Days 2015 OpenCms at erarta
 
OpenCms Days 2015 Arkema, a leading chemicals company
OpenCms Days 2015 Arkema, a leading chemicals companyOpenCms Days 2015 Arkema, a leading chemicals company
OpenCms Days 2015 Arkema, a leading chemicals company
 
OpenCms Days 2014 - How Techem handles international customer portals
OpenCms Days 2014 - How Techem handles international customer portalsOpenCms Days 2014 - How Techem handles international customer portals
OpenCms Days 2014 - How Techem handles international customer portals
 
OpenCms Days 2014 - OpenCms cloud setup with the FI-TS
OpenCms Days 2014 - OpenCms cloud setup with the FI-TSOpenCms Days 2014 - OpenCms cloud setup with the FI-TS
OpenCms Days 2014 - OpenCms cloud setup with the FI-TS
 
OpenCms Days 2014 - OpenCms Module Development and Deployment with IntelliJ, ...
OpenCms Days 2014 - OpenCms Module Development and Deployment with IntelliJ, ...OpenCms Days 2014 - OpenCms Module Development and Deployment with IntelliJ, ...
OpenCms Days 2014 - OpenCms Module Development and Deployment with IntelliJ, ...
 
OpenCms Days 2014 - OpenCms 9 - A video tube?
OpenCms Days 2014 - OpenCms 9 - A video tube?OpenCms Days 2014 - OpenCms 9 - A video tube?
OpenCms Days 2014 - OpenCms 9 - A video tube?
 
OpenCms Days 2014 - User Generated Content in OpenCms 9.5
OpenCms Days 2014 - User Generated Content in OpenCms 9.5OpenCms Days 2014 - User Generated Content in OpenCms 9.5
OpenCms Days 2014 - User Generated Content in OpenCms 9.5
 
OpenCms Days 2014 - Using the SOLR collector
OpenCms Days 2014 - Using the SOLR collectorOpenCms Days 2014 - Using the SOLR collector
OpenCms Days 2014 - Using the SOLR collector
 
OpenCms Days 2014 - Introducing the 9.5 OpenCms documentation
OpenCms Days 2014 - Introducing the 9.5 OpenCms documentationOpenCms Days 2014 - Introducing the 9.5 OpenCms documentation
OpenCms Days 2014 - Introducing the 9.5 OpenCms documentation
 
Open cms days 2013 - all dressed up_release
Open cms days 2013 - all dressed up_releaseOpen cms days 2013 - all dressed up_release
Open cms days 2013 - all dressed up_release
 

Recently uploaded

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.
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️Delhi Call girls
 
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
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software DevelopersVinodh Ram
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Steffen Staab
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerThousandEyes
 
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
 
Clustering techniques data mining book ....
Clustering techniques data mining book ....Clustering techniques data mining book ....
Clustering techniques data mining book ....ShaimaaMohamedGalal
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVshikhaohhpro
 
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
 
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
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...panagenda
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...MyIntelliSource, Inc.
 
Active Directory Penetration Testing, cionsystems.com.pdf
Active Directory Penetration Testing, cionsystems.com.pdfActive Directory Penetration Testing, cionsystems.com.pdf
Active Directory Penetration Testing, cionsystems.com.pdfCionsystems
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Modelsaagamshah0812
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdfWave PLM
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantAxelRicardoTrocheRiq
 
(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
 

Recently uploaded (20)

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...
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 
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 ☂️
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software Developers
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
 
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
 
Clustering techniques data mining book ....
Clustering techniques data mining book ....Clustering techniques data mining book ....
Clustering techniques data mining book ....
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
 
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
 
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
 
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
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
 
Active Directory Penetration Testing, cionsystems.com.pdf
Active Directory Penetration Testing, cionsystems.com.pdfActive Directory Penetration Testing, cionsystems.com.pdf
Active Directory Penetration Testing, cionsystems.com.pdf
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service Consultant
 
(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...
 

OpenCms Days 2014 - OpenCms content editor and pdf extensions

  • 1. Workshop track Content editor and PDF extensions in 9.5 Georg Westenberger, Alkacon Software 27.11.2014
  • 2. ● PDF extensions ● Generating PDFs from XML contents ● Generating thumbnails for PDFs ● Content editor extensions ● Locale synchronization ● Visibility handlers ● Change handlers 2 Overview
  • 3. ● Generate PDFs from XML contents ● Write a JSP to generate XHTML which is then converted to PDF using the flying-saucer library ● See code.google.com/p/flying-saucer/ for more info on the library. ● PDFs are not stored in VFS, but generated on the fly when a special PDF link is used 3 PDF Generation
  • 4. Demo Demo ● Live Demo 4 PDF Generation Demo Demo デモ
  • 5. ● Step 1: Write a JSP to generate XHTML from your XML content ● Step 2: Generate a PDF link with the <cms:pdf> tag ● <cms:pdf format='/system/modules/com.alkacon.bootstrap.formatters/pages/blog -pdf.jsp' content='${content.filename}' locale='en'/>" 5 PDF Generation – how to use
  • 6. ● Generate thumbnails for PDFs in various formats ● <cms:pdfthumbnail format=„png“ file=„/my-document. pdf“ width=„50“ /> ● format: format for the thumbnails, use ‚png‘ or ‚jpg‘ ● file: the path of the PDF for which to generate the thumbnail ● width / height: At least one of these need to be set, determines dimensions of thumbnail ● PDF thumbnails are cached on the server file system 6 PDF thumbnails
  • 7. Demo Demo ● Live Demo 7 PDF thumbnails Demo Demo デモ
  • 8. ● These only work with the XML content editor introduced in OpenCms 8.5, not with the older XML content editor or any other way of editing XML contents ● Example: Type bs-image in the demo 8 Notes on the content editor enhancements
  • 9. ● Sometimes, no localization is needed for some values in an XML content ● For example: IDs (product ID,…), images, configuration data ● Make selected fields locale-independent ● For any change made in the editor, the field value is updated in all other locales 9 Locale synchronization
  • 10. Demo Demo ● Live Demo 10 Locale synchronization Demo Demo デモ
  • 11. ● Configure in XSD schema ● Example image.xsd: <xsd:sequence> … <xsd:element name="Headline" type="OpenCmsString" /> <xsd:element name="Image" type="OpenCmsVfsFile" /> … </xsd:sequence> … <synchronizations> <synchronization element="Image" /> </synchronizations> 11 Locale synchronization
  • 12. ● Hide content fields from the user dynamically ● Visibility is determined by custom Java class ● Example: hide cryptic status / configuration values from normal users, restrict them to admins. 12 Field visibility handlers
  • 13. Demo Demo ● Live Demo 13 Field visibility handlers Demo Demo デモ
  • 14. ● Configure in XSD schema: <visibilities> <visibility element="GalleryTitle" params="ROLE.GALLERY_EDITOR" /> <visibility element=“OtherField" class=“my.custom.VisibilityHandler” params=“parameters for my custom class" /> </visibilities> ● element: The field being checked for visibility ● class: The Java class responsible for deciding whether the field is visible ● params: Configuration string passed to the Java class 14 Field visibility handlers
  • 15. ● Visibility handler class: class MyVisibilityHandler implements I_CmsXmlContentVisibilityHandler { public boolean isValueVisible( CmsObject cms, I_CmsXmlSchemaType value, String elementPath, String params, CmsResource resource, Locale contentLocale) { return true; } } 15 Field visibility handlers
  • 16. ● Basic idea: Automatically update other fields when a given field is changed ● Example: Updating a content field from a property of a linked image 16 Dynamic field handlers
  • 17. <editorchangehandlers> <editorchangehandler class="org.opencms.ade.contenteditor.CmsEditorChang eHandlerProperty" scope="Image" configuration="Copyright|../Copyright" /> </editorchangehandlers> ● class : Custom Java class to process changes ● scope : Path of the field which is watched for changes ● configuration : Configuration string passed to the change handler class 17 Dynamic field handlers
  • 18. ● Extend A_CmsXmlContentEditorChangeHandler and implement these methods: public CmsXmlContent handleChange( CmsObject cms, CmsXmlContent content, Locale locale, Collection<String> changedPaths) public void setConfiguration(String configuration) Note: The return value of handleChange is not used, modify the CmsXmlContent parameter directly instead 18 Dynamic field handlers
  • 19. ● Any Questions? 19 Any Questions? Fragen? Questions ? 質問¿Preguntas? Questiones?
  • 20. Thank you very much for your attention! Georg Westenberger Alkacon Software GmbH http://www.alkacon.com http://www.opencms.org 20