SlideShare a Scribd company logo
1 of 41
Custom Field Controls and SharePoint Web Content Management Chakkaradeep Chandran  Robert Stewart
Session Overview ,[object Object]
Intergen – “powered by Microsoft Office SharePoint” Demo
Role of Content Types, Site Columns in a Publishing Site
Custom Field Types
Web Parts Vs Field Controls as content regions
Custom field type development topics,[object Object]
WCM features are provided primarily by the Publishing Site feature
Several standard SharePoint components work together to provide WCM functionality
Key Components of a Publishing Site
Site Columns
Content Types
Field Controls
Page Layouts
Document Libraries
Lists,[object Object]
Page Layouts, Content Types, Site Columns GeneralPage Content Type Title Title Description Page Content Page Image Vincent van Gogh Gogh was a Dutch Post-Impressionist artist who live in the 1800s. Van Gogh spent his early adult life working for a firm of art dealers. After a brief spell as a teacher, he became a missionary worker in a very poor mining region. He did not embark upon a career as an artist until 1880.  Vincent van Gogh Gogh was a Dutch Post-Impressionist artist who live in the 1800s. Van Gogh spent his early adult life working for a firm of art dealers. After a brief spell as a teacher, he became a missionary worker in a very poor mining region. He did not embark upon a career as an artist until 1880.  Description Page Content Page Image GeneralPageLayout.aspx
Custom Field Types ,[object Object]
Text
Choice Fields
Hyperlink or Picture
Publishing HTML
Create custom field types to satisfy requirements not met by out of the box field types
Field Type == Data Type
Field type provide field rendering facilities
Field controls are tightly coupled with the type of the field
Field controls deliver or capture the content in a Publishing Page,[object Object]
Rule of thumb:
Use field controls for content and Web Parts for functionality
Since a field control is bound to a specific field of an item, it offers complete versioning/history
Web Parts do not offer complete versioning/history,[object Object]
Development Components Demo {.......} {....}
Demo Field Control – Rendering Template & Rendering Control
Field Control – Rendering Template Demo Rendering Template Edit Mode Display Mode
Field Control – Rendering Control Demo Edit Mode Display Mode ,[object Object]
 A RenderingTemplate object is defined as a RenderingTemplate element in an .ascx file
 The rendering template is referenced by its ID value in the rendering control object's TemplateName property,[object Object]
Rendering Control – CreateChildControls Demo Edit Mode Display Mode
Demo InPagePod Field – Rendering Template & Rendering Control
Field Control – Summary Demo Rendering Template Rendering Control Naming Convention - field_type_nameFieldControl Edit Mode Display Mode The Rendering Template is referenced by its ID value in the Rendering Control object's TemplateName property BaseFieldControl-derived rendering control handles interaction with users Its plain simple HTML/ASCX code
Demo Field Class

More Related Content

More from Chakkaradeep Chandran

Business connectivity solutions runtime and object model deep dive (part 2)
Business connectivity solutions runtime and object model deep dive (part 2)Business connectivity solutions runtime and object model deep dive (part 2)
Business connectivity solutions runtime and object model deep dive (part 2)
Chakkaradeep Chandran
 
Building business applications using business connectivity services using sha...
Building business applications using business connectivity services using sha...Building business applications using business connectivity services using sha...
Building business applications using business connectivity services using sha...
Chakkaradeep Chandran
 
Visual Studio2010 Tools For Share Point
Visual Studio2010 Tools For Share PointVisual Studio2010 Tools For Share Point
Visual Studio2010 Tools For Share Point
Chakkaradeep Chandran
 

More from Chakkaradeep Chandran (14)

Build client-side web parts for Microsoft SharePoint
Build client-side web parts for Microsoft SharePointBuild client-side web parts for Microsoft SharePoint
Build client-side web parts for Microsoft SharePoint
 
Getting started with Office 365 APIs
Getting started with Office 365 APIsGetting started with Office 365 APIs
Getting started with Office 365 APIs
 
Deep Dive Mobile Development with Office 365
Deep Dive Mobile Development with Office 365Deep Dive Mobile Development with Office 365
Deep Dive Mobile Development with Office 365
 
Business connectivity solutions runtime and object model deep dive (part 2)
Business connectivity solutions runtime and object model deep dive (part 2)Business connectivity solutions runtime and object model deep dive (part 2)
Business connectivity solutions runtime and object model deep dive (part 2)
 
Building business applications using business connectivity services using sha...
Building business applications using business connectivity services using sha...Building business applications using business connectivity services using sha...
Building business applications using business connectivity services using sha...
 
Practical SharePoint 2010 Architecture Planning
Practical SharePoint 2010 Architecture PlanningPractical SharePoint 2010 Architecture Planning
Practical SharePoint 2010 Architecture Planning
 
Building Custom BCS .NET Connectors
Building Custom BCS .NET ConnectorsBuilding Custom BCS .NET Connectors
Building Custom BCS .NET Connectors
 
Building custom solutions for SharePoint 2010 Online
Building custom solutions for SharePoint 2010 Online Building custom solutions for SharePoint 2010 Online
Building custom solutions for SharePoint 2010 Online
 
Business Connectivity Services (BCS) for Developers
Business Connectivity Services (BCS) for Developers Business Connectivity Services (BCS) for Developers
Business Connectivity Services (BCS) for Developers
 
Building Solutions With Business Connectivity Services
Building Solutions With Business Connectivity ServicesBuilding Solutions With Business Connectivity Services
Building Solutions With Business Connectivity Services
 
Getting Started with SharePoint Development
Getting Started with SharePoint DevelopmentGetting Started with SharePoint Development
Getting Started with SharePoint Development
 
Visual Studio2010 Tools For Share Point
Visual Studio2010 Tools For Share PointVisual Studio2010 Tools For Share Point
Visual Studio2010 Tools For Share Point
 
Developing With Data Technologies
Developing With Data TechnologiesDeveloping With Data Technologies
Developing With Data Technologies
 
SharePoint And WCM
SharePoint And WCMSharePoint And WCM
SharePoint And WCM
 

Recently uploaded

+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 

Recently uploaded (20)

Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 

SharePoint Custom Field Controls

  • 1. Custom Field Controls and SharePoint Web Content Management Chakkaradeep Chandran Robert Stewart
  • 2.
  • 3. Intergen – “powered by Microsoft Office SharePoint” Demo
  • 4. Role of Content Types, Site Columns in a Publishing Site
  • 6. Web Parts Vs Field Controls as content regions
  • 7.
  • 8. WCM features are provided primarily by the Publishing Site feature
  • 9. Several standard SharePoint components work together to provide WCM functionality
  • 10. Key Components of a Publishing Site
  • 16.
  • 17. Page Layouts, Content Types, Site Columns GeneralPage Content Type Title Title Description Page Content Page Image Vincent van Gogh Gogh was a Dutch Post-Impressionist artist who live in the 1800s. Van Gogh spent his early adult life working for a firm of art dealers. After a brief spell as a teacher, he became a missionary worker in a very poor mining region. He did not embark upon a career as an artist until 1880. Vincent van Gogh Gogh was a Dutch Post-Impressionist artist who live in the 1800s. Van Gogh spent his early adult life working for a firm of art dealers. After a brief spell as a teacher, he became a missionary worker in a very poor mining region. He did not embark upon a career as an artist until 1880. Description Page Content Page Image GeneralPageLayout.aspx
  • 18.
  • 19. Text
  • 23. Create custom field types to satisfy requirements not met by out of the box field types
  • 24. Field Type == Data Type
  • 25. Field type provide field rendering facilities
  • 26. Field controls are tightly coupled with the type of the field
  • 27.
  • 29. Use field controls for content and Web Parts for functionality
  • 30. Since a field control is bound to a specific field of an item, it offers complete versioning/history
  • 31.
  • 32. Development Components Demo {.......} {....}
  • 33. Demo Field Control – Rendering Template & Rendering Control
  • 34. Field Control – Rendering Template Demo Rendering Template Edit Mode Display Mode
  • 35.
  • 36. A RenderingTemplate object is defined as a RenderingTemplate element in an .ascx file
  • 37.
  • 38. Rendering Control – CreateChildControls Demo Edit Mode Display Mode
  • 39. Demo InPagePod Field – Rendering Template & Rendering Control
  • 40. Field Control – Summary Demo Rendering Template Rendering Control Naming Convention - field_type_nameFieldControl Edit Mode Display Mode The Rendering Template is referenced by its ID value in the Rendering Control object's TemplateName property BaseFieldControl-derived rendering control handles interaction with users Its plain simple HTML/ASCX code
  • 42.
  • 43.
  • 44. Field Class – Summary Demo Naming Convention - field_type_nameField Field class should inherit either SPField or one of the various other SPField classes InPagePod inherits from SPFieldMultiColumn Override the FieldRenderingControlproperty which returns the control that can be used to render the field in Edit and Display mode Field Class object handles interactions with the content database
  • 46. Field Value Demo String Value (Or) titleImgUrl;podContent;contentImageUrl Custom Value Class SPFieldMultiColumnSPFieldMultiColumnValue SPFieldUrl SPFieldUrlValue ;#TitleImage;#PodContent;#ContentImage;#
  • 47. Field Value – Saving Field Values Demo
  • 48. Demo InPagePod Field – Field Value
  • 49. Field Value– Summary Demo Naming Convention - field_type_nameFieldValue String Value Custom Value Class A custom field value class must implement at least two constructors, and usually only two SharePoint delimiter - ;#
  • 51. Field Validation Demo (when the Publishing Page is validated) (before committing to the content database)
  • 52. Validate When Saving Field Values Demo
  • 53. Overriding Validate Method Demo ;#TitleImage;#PodContent;#ContentImage;#
  • 54. Overriding GetValidatedString Method Demo ;#TitleImage;#PodContent;#ContentImage;#
  • 55. Demo InPagePod Field – Field Validation
  • 56. Field Validation – Summary Demo Validate the control values before setting the field values in the Field Control class Set the IsValidto false Set the ErrorMessageto an appropriate error message Override the Validate method in the Field Control class Set the IsValidto false Set the ErrorMessageto an appropriate error message Override the GetValidatedString in the Field class Throw SPFieldValidationException as an error
  • 57. Demo Field Type Definition
  • 58. Field Type Definition Demo fldtypes_spconf.xml fldtypes*.xml
  • 59. Demo InPagePod Field – Field Type Definition
  • 60. Demo Custom Field Type Deployment
  • 61. Custom Field – Deployment Demo *.ascx Rendering Template 12EMPLATEONTROLTEMPLATESbr />Rendering Control Class *.cs (.dll) Field Control Class fldtypes*.xml GAC Field Class Field Value Class Field Type Definition 12EMPLATEMLbr />*.WSP
  • 62. Custom Field – Usage Demo
  • 64. Resources Demo Web Content Management Resource Center for SharePoint Server http://bit.ly/moss-wcm SharePoint Server Developer Center http://bit.ly/moss-dev MSDN: How to Create a Custom Field Control http://bit.ly/custom-field-control Chaks’ Blog http://bit.ly/chaks Robert Stewart’s Blog http://bit.ly/robert-stewart
  • 65. Thank You chaks@intergen.co.nz robs@intergen.co.nz