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
<!-- This is the Code to open modal Dialog -->
<xp:this.rowAttrs> <xp:attr name="onClick">
<xp:this.value><![CDATA[#{javascript:try
{
var curDoc:NotesDocument = viewEntry.getDocument();
var aPath=sessionScope.pathDBName;
return "$('#modal_theme_custom').modal('show');";
//return "OpenModal('show', 'modal_theme_custom','" + curDoc.getUniversalID().toString() + "');";
}
catch(e)
{
print(e.toString());
}
}]]></xp:this.value>
</xp:attr>
</xp:this.rowAttrs>
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...
function OpenModal(mode, modalName, unid)
{
var action = "";
var windowName = "";
var documentId = (unid != null) ? + unid : "";
var URLSuffix = "";
var noteWebLink = "$('#" + modalName + "').modal('" + mode + "');";
return noteWebLink;
}

Use xe:dialog as the main container for your modal dialog and open or close it by addressing its id( id="dialog1" below). Within that create xp:panel and define your data source. You can use xe:dialogContent and xe:dialogButtonBar to organize the rest of the content of the dialog.
You can open and close using csjs:
Or use ssjs: