5 Replies Latest reply: Jun 25, 2013 2:27 AM by Patrik Seger RSS

    Using Expression in Definition.xml/Properties.qvpp/Script.js

    Steffen Prendke

      Hey,

      I want to have access via JavaScript to an expression which I have defined in the Definition.xml.

      Definition.xml:

      ===========

      <?xml version="1.0" encoding="utf-8"?>

      <ExtensionObject xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="Definition.xsd" Label="EXTENSIONNAME">

          <Initiate Name="Caption.Text" Value="EXTENSIONNAME" />

          <Initiate Name="Caption.Font.Italic" Value="1" />

          <Initiate Name="Chart.BgColor.ColorHex" Value="#FFFFE0" />

          <Text Label="User" Expression="=OSUser()"/>

      </ExtensionObject>

      Properties.qvpp:

      ============

      <div class="ToolWindow-MainBody" avq="foldOutMenu:." style="overflow: visible !important; float: left;">

        <div class="prop-accordion" avq="accordion:.">

          <h3 class="prop-h3 accordion-shadow">

            <a href="#">EXTENSIONNAME</a>

          </h3>

          <div class="prop-grid_container accordion-shadow-enabler" style="overflow:auto;">

            <div class="prop-grid_clear prop-grid_top-vertical-spacer-12px prop-grid_last"></div>

        </div>

          <h3 class="prop-h3 accordion-shadow" avq="activeAccordionHeader:.:GenericPresentationFoldout.qvpp">

            <a href="#">Presentation</a>

          </h3>

          <div class="prop-grid_container accordion-shadow-enabler" avq="panel::Layout.qvpp"></div>

          <h3 class="prop-h3 accordion-shadow" name="accordion-header" avq="activeAccordionHeader:.:PropertiesCaptionFoldout.qvpp">

            <a href="#">Caption</a>

          </h3>

          <div class="prop-grid_container accordion-shadow-enabler" avq="panel:.:Caption.qvpp"></div>

          <h3 class="prop-h3 accordion-shadow" name="accordion-header" avq="activeAccordionHeader:.:PropertiesOptionsFoldout.qvpp">

            <a href="#">Options</a>

          </h3>

          <div class="prop-grid_container accordion-shadow-enabler" avq="panel:.:ChartOptions.qvpp"></div>

      <div class='prop-grid_clear prop-grid_prepend-1 prop-grid_span-5' avq='prop_label'>User:</div>

      <div class='prop-grid_span-10 prop-grid_last'>

        <div class='popup-grid_span-7 popup-grid_last' style='width:94%;' avq='prop_editexpression:.Chart.Text.0.Content'></div>

      </div>

        </div>

        <span class="bottom-gap"></span>

      </div>

      Script.js

      ======

      var user = this.Layout.Text0.text;

       

      What make I wrong, in the ObjectProperties window, there stands no text, also I haven' t this attribute in my JavaScript(this.Layout.(Text0 not there))