Reference: Most important base classes - ProviderControlPanel class

Reference: Most important base classes - ProviderControlPanel class

April 22, 2009 0 Comments

The content you're reading is getting on in years
This post is on the older side and its content may be out of date.
Be sure to visit our blogs homepage for our latest news, updates and information.

[This post is part of the developer's manual preview published on this blog. You can find temporary TOC here.]

 

ProviderControlPanel is a specialized ControlPanel class which comes with built-in infrastructure for the modules that support multiple providers. If your module supports multiple providers (see provider model pattern), your control panel class should inherit from the ProviderControlPanel and not from ControlPanel class, as it is demonstrated in this sample:

public class BlogsControlPanel : ProviderControlPanel<BlogsControlPanel> 
The ProviderControlPanel class will give you the built-in selector for all the providers that have been defined for the module. The following image depicts this functionality:

ProviderControlPanel inherits from ControlPanel class, which inherits from ViewModeControl class, so you can use references for these classes when working with ProviderControlPanel.

 

Properties


  • string ProviderName
    Gets or sets the name of the data provider that will be used to retrieve and manipulate data. The built-in selector will automatically set this property when user changes the provider through  the user interface.
  • string ProviderSelectorPanelTitle
    Gets or sets the title of the panel containing the data provider selector. Usually this is the first command panel on the top right side of the control panel.

Methods


  • ICommandPanel CreateProviderSelectorPanel()
    This method is in charge of creating the provider selector panel and indicates the currently selected provider. This method can be overridden in case that implementation should be different.
  • string GetDefaultProviderName()
    Gets the default provider name for the module. This method should always be overridden on the actual implementation of the control panel and name of the default provider should be returned.
  • string[] GetProviderNames()
    Gets the array of all provider names supported by this module. This method should always be overridden on the actual implementation of the control panel and names of all providers supported by the module should be returned as an string array.
progress-logo

The Progress Team

View all posts from The Progress Team on the Progress blog. Connect with us about all things application development and deployment, data integration and digital business.

Comments
Comments are disabled in preview mode.
Topics
 
 
Latest Stories in
Your Inbox
Subscribe
More From Progress
d12fcc0bdb669b804e7f71198c9619a7
5 Questions Automakers Should Ask to Improve Asset Uptime
Download Whitepaper
 
SF_MQ_WCM
2018 Gartner Magic Quadrant Web Content Management (WCM)
Download Whitepaper
 
What-Serverless-Means-For-Enterprice-Apps-Kinvey
What Serverless Means for Enterprise Apps
Watch Webinar