title: Connecting UI Elements in Google Apps Script (TabPanel - UiApp)
body: <p>I've already asked a <a href="https://stackoverflow.com/questions/20036597/how-to-load-a-ui-from-another-ui-redirection">similar question</a>, but I really can't figure out how to connect these elements together. I'm still not very good with <code>Handlers</code>, and I guess my question is:</p>
  
  <p><strong>How can I access UI Widgets (and their children) while outside of the doGet() function?</strong></p>
  
  <p>My use case is this: I have a list of projects/IDs. I have all the data I want based on the ID that will populate the <em>Project Details</em> tab of this application. I created 'unique' <code>Button</code>s for each of these Projects, and threw them into a <code>Grid</code>. Now, I want to generate the <em>Project Details</em> (<code>detailPanel</code>) <code>Widget</code>s specifically for each <code>Button</code> if/when it is clicked.</p>
  
  <p>I have the Project ID attached to each <code>Button</code> (uniquely) through a <code>Hidden</code>, but I can't seem to attach the <em>Project Details</em> tab (<code>detailPanel</code>) to the <code>Button</code> so that, when clicked, I can set the values for the <code>TextBox</code>, <code>DateBox</code>, <code>ListBox</code>, etc. <code>Widget</code>s of the <code>detailPanel</code>.</p>
  
  <p>I think I'm missing something obvious about this. I want to <strong>avoid attaching each child Widget of the <code>detailPanel</code> as a <code>callbackElement</code> of the <code>Button</code> <em>at all costs</em></strong>. There are around 40 elements (I've lost count), and it seems really inefficient. I'm almost sure that if I can add one <code>Widget</code> as a callback element, that I get access to all <em>child</em> <code>Widget</code>s. But I tried, and that doesn't seem to be the case.</p>
  
  <p>Here is the link to the public <a href="https://script.google.com/macros/s/AKfycbyZhqfOCIPOgAhhG0qwoxH8hBNajldwbRTifQUwUHn09pdNUVcz/exec" rel="nofollow noreferrer">UiApp</a>, which shows the UI. And the sister <a href="https://script.google.com/macros/s/AKfycbyZhqfOCIPOgAhhG0qwoxH8hBNajldwbRTifQUwUHn09pdNUVcz/edit" rel="nofollow noreferrer">Script Project (uneditable)</a>.</p>