Visual Studio Project Templates for K2 blackpearl Extensions

  • 13 May 2013
  • 9 replies
  • 161 views

Badge +8

These Visual Studio Project templates (.visx) can help you to implement extensions for the K2 blackpearl framework easily when using Visual Studio 2010 or Visual Studio 2012. The following project templates are currently available: · Custom Inline Function · Custom Notification Provider · Custom Security Provider · Custom SmartForms Control (SmartForms 1.0.2 or later) · Custom Logging Extension · Custom Service Broker (Dynamic/Discovered Schema) ·


You can also access these here.

 


9 replies

Badge +4
How to hookup validation properties

The SmartForms Basic Client Control Item template was a huge help. Does anyone have some sample code (in particular for hooking things up in the javascript file) that supports the validation properties (MaxLength, ValidationPattern, ValidationMessage)?

Badge +8

In reply to oremac's question. (Sorry this is very late and probably of limited use to you right now, but perhaps it helps others). I copied the below from anothe rmail thread regarding validaiotn for custom controls:

 

Custom validation is well within the scope of a custom control. The first thing you need is to make sure that you set the validation function. There is a number a ways to do this but in the end it should be in the Forms.ControlType  table. The second part is the actual method.

 

The function signature should look something like validate: function (objInfo)

 

You can then find out the instance id of the control with objInfo.CurrentControlId.

 

Once in your function setobjInfo.Pattern to the message you want to show and objInfo.Error = true; when you want to show invalid.

 

At the end of the function you will want something like UtilitiesHelper.showValidationMessage(this.element, objInfo);

Just replace this.element with the element you want to add the tool tip and the invalid class to, make sure it is jquary wrapped. Also remember you will need a css selector to give the nice red border.

EX:

.theme-entry .MyControl.invalid

{

       border: 1px solid #e7000e !important;

}

 

Badge +8

There have been a few questions regarding creating custom controls for list views. Until at least March 2013/SmartForms v 1.0.4, it is not possible to create custom controls for listviews, only for item views. I am not sure of the version roadmap plans to support custom controls for list views, but just bear this in mind so you do not spend too much time trying to troubleshoot why your custom control does not show up in a list view. If you are using a later version of SmartForms check the release notes/log a support ticket to determine whether custom controls in listviews are supported yet in your version.

Is this going to be updated for Visual Studio 2013 and beyond?

Badge +8

I have added a new version of the .visx that is compatibile with both VS2012 and VS2013. Credit and thanks to Lewis G. for making the necessary tweaks to allow the visx to work in VS2013.

As with all community projects, participation and sharing is encouraged, so feel free to make enhancements and tweaks as you see fit. Please share your improvements with this project group so everyone can benefit.

 

Cheers

Neil

Badge +2

Any chance anyone has created VS2015 versions?

Badge +8

I updated the templates to support VS 2012, VS2013 and VS2015. (Apologies for potentially confusing version naming scheme, the version name's length is limited by the content system for this forum)

Hello Neil,

 

I have installed this onto VS 2015, and a colleague onto VS 2013, yet we both cannot use the extension - it does not appear under Installed > Templates.

Any idea where we may be going wrong? What files are included in the extension - what do we expect to see?

Additionally, does the extension need to appear in the user area, under the relevant Visual Studio folder?

 

Cheers,

Hayley


hi. will the templates be availble for VS2019 ?

 

Reply