<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic How to manipulate elements that are inside a dialog in Nuxeo Forum</title>
    <link>https://connect.hyland.com/t5/nuxeo-forum/how-to-manipulate-elements-that-are-inside-a-dialog/m-p/317968#M4969</link>
    <description>&lt;P&gt;I have a create layout with a nuxeo-data-table and I would like to show/hide fields based on user input inside of the nuxeo-dialog but I am unable to.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;    &amp;lt;nuxeo-data-table role="widget" items="{{document.properties.request:itemsToCreate}}" orderable="true" editable="true"&amp;gt;
      &amp;lt;nuxeo-data-table-column name="Document Type"&amp;gt;
        &amp;lt;template&amp;gt;
          &amp;lt;nuxeo-directory-suggestion role="widget" value="[[item.doc]]" readonly="true" directory-name="docType"&amp;gt;&amp;lt;/nuxeo-directory-suggestion&amp;gt;
        &amp;lt;/template&amp;gt;
      &amp;lt;/nuxeo-data-table-column&amp;gt;

      &amp;lt;nuxeo-data-table-column name="Asset Type"&amp;gt;
        &amp;lt;template&amp;gt;
          &amp;lt;nuxeo-directory-suggestion role="widget" value="[[item.asset]]" readonly="true" directory-name="allType"&amp;gt;&amp;lt;/nuxeo-directory-suggestion&amp;gt;
        &amp;lt;/template&amp;gt;
      &amp;lt;/nuxeo-data-table-column&amp;gt;

      &amp;lt;nuxeo-data-table-column name="Description"&amp;gt;
        &amp;lt;template&amp;gt;
          [[item.description]]
        &amp;lt;/template&amp;gt;
      &amp;lt;/nuxeo-data-table-column&amp;gt;

      &amp;lt;nuxeo-data-table-form&amp;gt;
        &amp;lt;template&amp;gt;
          &amp;lt;nuxeo-directory-suggestion id="type" role="widget" value="{{item.doc}}" label="Document Type" directory-name="docType" min-chars="0" required="true" on-value-changed="_calculateSubfields"&amp;gt;&amp;lt;/nuxeo-directory-suggestion&amp;gt;
          &amp;lt;nuxeo-directory-suggestion id="subtype" value="{{item.asset}}" label="Asset Type" directory-name$="{{subType}}" role="widget" min-chars="0" hidden$="{{!showSubTypeField}}" directory-name=""&amp;gt;&amp;lt;/nuxeo-directory-suggestion&amp;gt;
          &amp;lt;nuxeo-input label="Description" value="{{item.description}}" type="text"&amp;gt;&amp;lt;/nuxeo-input&amp;gt;
        &amp;lt;/template&amp;gt;
      &amp;lt;/nuxeo-data-table-form&amp;gt;
    &amp;lt;/nuxeo-data-table&amp;gt;

  &amp;lt;/template&amp;gt;

  &amp;lt;script&amp;gt;
    Polymer({
      is: 'nuxeo-items-to-create',
      behaviors: [Nuxeo.LayoutBehavior],
      properties: {
        subType: { type: String, value: ''},
        showSubTypeField: {type: Boolean, value: false},
        document: {
          type: Object
        }
      },
    _calculateSubfields: function(e) {
      var selection = e.detail.value;
      this.$.subtype.attributes['directory-name'].nodeValue = selection;
      this.showSubTypeField = true;
    }
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;PRE&gt;&lt;CODE&gt;this.$.subtype
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;is not defined.&lt;/P&gt;</description>
    <pubDate>Tue, 10 Apr 2018 13:04:08 GMT</pubDate>
    <dc:creator>Jackie_A</dc:creator>
    <dc:date>2018-04-10T13:04:08Z</dc:date>
    <item>
      <title>How to manipulate elements that are inside a dialog</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/how-to-manipulate-elements-that-are-inside-a-dialog/m-p/317968#M4969</link>
      <description>&lt;P&gt;I have a create layout with a nuxeo-data-table and I would like to show/hide fields based on user input inside of the nuxeo-dialog but I am unable to.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;    &amp;lt;nuxeo-data-table role="widget" items="{{document.properties.request:itemsToCreate}}" orderable="true" editable="true"&amp;gt;
      &amp;lt;nuxeo-data-table-column name="Document Type"&amp;gt;
        &amp;lt;template&amp;gt;
          &amp;lt;nuxeo-directory-suggestion role="widget" value="[[item.doc]]" readonly="true" directory-name="docType"&amp;gt;&amp;lt;/nuxeo-directory-suggestion&amp;gt;
        &amp;lt;/template&amp;gt;
      &amp;lt;/nuxeo-data-table-column&amp;gt;

      &amp;lt;nuxeo-data-table-column name="Asset Type"&amp;gt;
        &amp;lt;template&amp;gt;
          &amp;lt;nuxeo-directory-suggestion role="widget" value="[[item.asset]]" readonly="true" directory-name="allType"&amp;gt;&amp;lt;/nuxeo-directory-suggestion&amp;gt;
        &amp;lt;/template&amp;gt;
      &amp;lt;/nuxeo-data-table-column&amp;gt;

      &amp;lt;nuxeo-data-table-column name="Description"&amp;gt;
        &amp;lt;template&amp;gt;
          [[item.description]]
        &amp;lt;/template&amp;gt;
      &amp;lt;/nuxeo-data-table-column&amp;gt;

      &amp;lt;nuxeo-data-table-form&amp;gt;
        &amp;lt;template&amp;gt;
          &amp;lt;nuxeo-directory-suggestion id="type" role="widget" value="{{item.doc}}" label="Document Type" directory-name="docType" min-chars="0" required="true" on-value-changed="_calculateSubfields"&amp;gt;&amp;lt;/nuxeo-directory-suggestion&amp;gt;
          &amp;lt;nuxeo-directory-suggestion id="subtype" value="{{item.asset}}" label="Asset Type" directory-name$="{{subType}}" role="widget" min-chars="0" hidden$="{{!showSubTypeField}}" directory-name=""&amp;gt;&amp;lt;/nuxeo-directory-suggestion&amp;gt;
          &amp;lt;nuxeo-input label="Description" value="{{item.description}}" type="text"&amp;gt;&amp;lt;/nuxeo-input&amp;gt;
        &amp;lt;/template&amp;gt;
      &amp;lt;/nuxeo-data-table-form&amp;gt;
    &amp;lt;/nuxeo-data-table&amp;gt;

  &amp;lt;/template&amp;gt;

  &amp;lt;script&amp;gt;
    Polymer({
      is: 'nuxeo-items-to-create',
      behaviors: [Nuxeo.LayoutBehavior],
      properties: {
        subType: { type: String, value: ''},
        showSubTypeField: {type: Boolean, value: false},
        document: {
          type: Object
        }
      },
    _calculateSubfields: function(e) {
      var selection = e.detail.value;
      this.$.subtype.attributes['directory-name'].nodeValue = selection;
      this.showSubTypeField = true;
    }
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;PRE&gt;&lt;CODE&gt;this.$.subtype
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;is not defined.&lt;/P&gt;</description>
      <pubDate>Tue, 10 Apr 2018 13:04:08 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/how-to-manipulate-elements-that-are-inside-a-dialog/m-p/317968#M4969</guid>
      <dc:creator>Jackie_A</dc:creator>
      <dc:date>2018-04-10T13:04:08Z</dc:date>
    </item>
  </channel>
</rss>

