Smart Image Links and other Wrapped CS Content

The Community Server Controls source library contains a WrappedContentBase class that can be extended for a variety of purposes, making it very easy to build context-aware controls to use in conjunction with other CS Chameleon List, Data and Form controls.

If you search “: WrappedContentBase” in the Community Server SDK you’ll find examples of controls derived from the class performing various functions.  I’m going to demonstrate using a smart image link to display a custom email Modal Window.  The final product looks like this.

 

WrappedContentBase-derived Chameleon controls are first cousins to other data-based controls, so I keep them with their immediate family of controls.

 

The HyperLinked image uses the <DBVT:POGroupData /> Chameleon control in current context as its datasource.   There is a certain symmetry between these WrappedContentBase controls and WrappedFormBase-derived Chameleon Form controls.  In the code excerpt below we see the role of the context datasource, a custom POGroup object, passing the object’s POID value to the Modal Window URL.

 

But what is possibly the most compelling feature of WrappedContentBase controls is how they can be so easily dropped on a page as shown below.

Article written by

A long time developer, I was an early adopter of Linux in the mid-90's for a few years until I entered corporate environments and worked with Microsoft technologies like ASP, then .NET. In 2008 I released Sueetie, an Online Community Platform built in .NET. In late 2012 I returned to my Linux roots and locked in on Java development. Much of my work is available on GitHub.