Displaying Docs w/n a View Panel via a Dialog

46 Views Asked by At

I have an XPages app, whereas I have an XPage that contains a viewpanel and two Custom Controls...both custom controls are dialogs that are used to entered information. All this works perfectly. However, what I am interested in is: how do I get a handle on selected/clicked document and display it via a dialog. I am somewhat familiar for with the "var" variable w/n the viewpanel properties, but am not sure this is the right approach, or even how to finish it. Can someone advise as to how to accomplish this, or even if I should go about it differently? Thanks in advance.

onClick - vwColumn & pageURL event:

var dataRes; 
if (rowData.isCategory()) { 
    return "";
} 
var href = facesContext.getExternalContext().getRequest().getContextPath();
try { 
    var doc = rowData.getDocument(); 
    if (doc != null) { 
        var docID = doc.getUniversalID();
        var formType = rowData.getColumnValue("Form")
        if(formType == "Memo") { 
            dataRes = href + "/memoXP.xsp?documentId=" + docID + "&action=openDocument";
        } else {
            dataRes = href + "/";
        }
    }
} catch (e) { 
    @WarningMessage(e) 
}
if (doc != null) {
    doc.recyle(); 
}
return dataRes;
0

There are 0 best solutions below