Qlik Community

QlikView Documents

Documents for QlikView related information.

Object Extension Templates

Employee
Employee

Object Extension Templates

This is an extension I created as a basic extension object template.  Hopefully, it is a helpful starting point in creating new extensions and can be copied and pasted, then modified to get the ball rolling.

I created this along with my Extension Object Basics documentation in the hopes of giving developers a good starting place for the basics of object extensions.

If there are any updates or other changes that you think I should make, please let me know and I can add them.

EDIT

I've updated this post to now be a zip file of two templates.  The one named template.qar is a template I built more with the intention of showing all of the most common properties and settings, including select boxes, check boxes, etc.  The one named template_simple.qar is a bare bones extensions template that may prove to be more useful as a base for copying and pasting to create a new extension.  In both of the templates, I've also improved the select dropdown property support.

Labels (1)
Attachments
Comments
Partner
Partner

Hi Brian,

I have a problem with your template.jar.

I got blank string for the DROP parameter in the extension object panel.

It seems the statement:

     var select = _this.Layout.Text0.text.toString();

doesn't works.

I'm expeting to get "select1 or select2 or select3" as value.

Currently I'm using version 11 SR2.

How can I fix it ?

Thanks in advance.

Best regards

Andrea

0 Likes
Employee
Employee

Hi Andrea,

This is when you use the template QAR exactly as is without changing anything?

0 Likes
adamdavi3s
Honored Contributor

Hi Brian,

I know this is an older document but it is absolutly fantastic and has really helped me with learning extensions.

I have only two suggestions for changes for the sake of simplicity:

1- as I am a thickie and just starting out with extensions, I just spent 4hours chasing a missing / on the template path. Therefore I also declared the template name and used this thus:

var template_Name = "06 Really Basic Chart using template"; //remeber to also update this in definition.xml

var template_Path = Qva.Remote + "?public=only&name=Extensions/" + template_Name +"/";

2- I found it easier to push the js files rather than using the nested functions so I used this:

function extension_Init() {

  var jsfiles = [];

  //load jquery if needed

  if (typeof jQuery == 'undefined') {

  jsfiles.push(extensionPath + "jquery.js");

  }

  //Pushing any other js files

  jsfiles.push(extensionPath + "d3.v3.min.js");

  //jsfiles.push(extensionPath + "additionalfileshere.js");

  //now load these and call next function

  Qva.LoadScript(jsfiles, extension_Done);

  } //end extension_Init

0 Likes
adamdavi3s
Honored Contributor

I also just found this code, which is just... wow... just amazing for debugging!

I found it on git but can't find the source to reference it now

//wow this is genius! It loads up firebug within the qlikview application so no

//more having to debug via the server

//remeber to comment it out in live though!

Qva.LoadScript('https://getfirebug.com/firebug-lite.js', function(){

extension_Init();

});

0 Likes
adamdavi3s
Honored Contributor

I stand corrected with this, firebug can't read the scripts locally (javascript restriction of course)

0 Likes
luis_castillov
New Contributor

thanks

0 Likes
Version history
Revision #:
1 of 1
Last update:
‎2013-01-07 12:17 PM
Updated by: