title: XPages View onClick Modal Dialog Show
body: <p>I can open standart Xpages (.xsp) when i click on document in view with a ClientSide function. But I have created HTML modal Dialog then I just want to open Modal Dialog when i click on the document in ViewPanel. This code below allows only to show Modal dialog that I would like it to be shown. I works correct. What i want to do is just open dialog with Document. RowAttrs belogs to ViewPanel</p>
  <pre><code>&lt;!-- This is the Code to open modal Dialog --&gt;
  &lt;xp:this.rowAttrs&gt; &lt;xp:attr name=&quot;onClick&quot;&gt;
  &lt;xp:this.value&gt;&lt;![CDATA[#{javascript:try 
  {
      var curDoc:NotesDocument = viewEntry.getDocument();
      var aPath=sessionScope.pathDBName;       
      return &quot;$('#modal_theme_custom').modal('show');&quot;; 
    //return &quot;OpenModal('show', 'modal_theme_custom','&quot; + curDoc.getUniversalID().toString() + &quot;');&quot;;
  } 
  catch(e)
  {
       print(e.toString()); 
       
  }   
  }]]&gt;&lt;/xp:this.value&gt;
  &lt;/xp:attr&gt;
  &lt;/xp:this.rowAttrs&gt;
  </code></pre>
  <p>I have created a function to open modal with document but I could not be succeded.
  Here is the function. If i could open dialog with this function I can pass trough the DocumentUniqueID then could open it.  I can send Whole Dialog Code...</p>
  <pre><code>function OpenModal(mode, modalName, unid) 
  { 
      var action = &quot;&quot;; 
      var windowName = &quot;&quot;; 
      
      var documentId = (unid != null) ?  + unid : &quot;&quot;; 
      var URLSuffix = &quot;&quot;;  
      var noteWebLink = &quot;$('#&quot; + modalName + &quot;').modal('&quot; + mode + &quot;');&quot;; 
      return noteWebLink;
  }
  </code></pre>
  <p><em><strong>UPDATE</strong></em>
  <a href="https://i.stack.imgur.com/VG8xb.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/VG8xb.png" alt="enter image description here" /></a></p>