6 Replies Latest reply: Mar 7, 2012 4:39 PM by Alexander Karlsson RSS

    New Document Extension Example Added

    Dan English

      Hi All,

       

      I've just uploaded A New Document Extension Example that will automatically kill an AJAX session on the QVS when the browser closes.

       

      It is very clean (2 files and 5 lines of code) and should be a great starting place to learn how docment extensions work (it includes some instructions as well).

       

      On top of that, it could be really useful too.

       

      Let me know what you think.

       

      Regards,

       

      Dan English

        • New Document Extension Example Added
          Jérémy George

          Your link appears to me as "Not authorized to view the specified document". How can I have a look at this extension?

            • New Document Extension Example Added
              Dan English

              Sorry, that should be fixed now. Let me know if you still can't get at the document.

                • New Document Extension Example Added
                  Jérémy George

                  It works now. I am a bit confused about document extensions, what do they provide beside a way to have some javascript code executed at the document opening?

                  It does not seem possible to define anything in the definition.xml, Text and RefValue do not work.

                  Am I missing something or is it just that?

                    • New Document Extension Example Added
                      Dan English

                      Hi jgeroge,

                       

                      That is correct. What a document extension gives you is the ability to access our JavaScript API outside of the context of a single object and with no built in UI component (extension obejcts, on the other hand are both in a single object context and have a built in UI component).

                       

                      Document extensions are ideal for when you want programmatic behavior that has no UI (as in the TerminateSession document extension example) or you want to alter the UI at the document level (there a few Document extension examples floating around that customize the AJAX client toolbar and tab row, for example).

                       

                      As fare as definition XML goes, we don't need much in there as we are not defining a QlikView object (dimensions, expressions) that actually calculates data as we would do when defining an extension object. Also, at the moment, there is no way to add a custom property page to your document extension (where would you click to open the properties?). Longer term I think we do want a way to allow setting properties for document extensions to make them more portable between QlikView documents, but right now in QlikView Version 11, Document Extensions do not have property pages. That's part of the reason the example is so clean.

                       

                      I hope this helps answer your question.

                       

                      Regards,

                       

                      Dan

                      • New Document Extension Example Added
                        Alexander Karlsson

                        Oh but jgeorge adding just a few lines of javascript provides endless opportunities

                         

                        A few examples on doc extensions we have used so far:

                        Rebuildning the tabrow into a dynamic nested dropdown menus.

                        "Floating" navigation panes

                        Adding event listeners to send information out externally for custom logging functionality

                        Ever wanted to save annotations in a sql database? Document extensions are for you.

                        Leverage webfonts to bring Kanji into QV

                         

                        We are currently also trying to build QV as a fully interactive slideshow emulating powerpoint, still some work needed on that.

                  • New Document Extension Example Added
                    Gary Strader

                    Dan,

                     

                    This is a great idea, we have had a need for something like this in the past.

                     

                    Gary