title: Pass variable from component model to author dialog
body: <p>I have a <a href="http://docs.adobe.com/docs/en/aem/6-0/develop/sightly.html" rel="nofollow">Sightly</a> component with a (JavaScript) <a href="http://docs.adobe.com/docs/en/aem/6-0/develop/sightly/use-api-in-javascript.html" rel="nofollow">UseAPI model</a> in an Adobe AEM/CQ site.</p>
  
  <p>In the model, I have a variable that is calculated when the component loads and is not stored in the JCR (let's say it's a random string).</p>
  
  <p>When an author opens the Granite/Touch UI dialog, there is a custom Granite UI component rendered with a JSP. The JSP has access to the scope of the component in the JCR, but as far as I can tell it does not have access to properties returned by the JavaScript model when rendering the component.</p>
  
  <p>How can I pass/store this 'random string' variable from the Sightly/JavaScript UseAPI so that it can be accessed by the JSP of the dialog?</p>
  
  <p>The variable is context-sensitive so I wouldn't want to store it in a permanent location such as the JCR. A good example may be a unique identifier for an external web service, that is unique for that particular rendering of the component.</p>