title: Attach browser event to a control using XML-View
body: <p>My REST service send me a lot of data. Every property contains the <code>value</code> and a <code>help</code>-attribute that contains a long description of the field property.</p>
  
  <p>Ok, I have data (a list of property with value and help) in a JSONModel and I use data-binding <strong>XML</strong> <a href="https://openui5.hana.ondemand.com/#docs/guide/91f0f3cd6f4d1014b6dd926db0e91070.html" rel="nofollow">https://openui5.hana.ondemand.com/#docs/guide/91f0f3cd6f4d1014b6dd926db0e91070.html</a> to map data <code>value</code> in forms and tables.
  Now I want show somehow <code>help</code> message for each property. </p>
  
  <p>My idea is show a <a href="https://openui5.hana.ondemand.com/explored.html#/entity/sap.m.Dialog/samples" rel="nofollow">message dialog</a>  when the user double-click on the <a href="https://openui5.hana.ondemand.com/docs/api/symbols/sap.m.Label.html" rel="nofollow">Label</a> or on the <a href="https://openui5.hana.ondemand.com/docs/api/symbols/sap.m.Text.html" rel="nofollow">Text</a> of the column header in a table</p>
  
  <p>Both Label and Text have <a href="https://openui5.hana.ondemand.com/docs/api/symbols/sap.ui.core.Control.html#attachBrowserEvent" rel="nofollow">attachBrowserEvent</a> method but <strong>I don't know how use the function to attach the event <em>wrinting only in the XML-views</em></strong></p>
  
  <p>I would like something like this:</p>
  
  <p>In XML-View:</p>
  
  <pre><code>&lt;Label text="Language" 
            attachBrowserEvent:"function("click",showMessageHelp({model&gt;/language/help}))"&gt;
  
  &lt;Input value="{model&gt;/language/value}"/&gt;
  </code></pre>
  
  <p>In the controller:</p>
  
  <pre><code>showMessageHelp:function(sMessage){
  
  //show message dialog with sMessage
  ...........
  }
  </code></pre>