I have an xpage that contains some fields and a custom control dialog box. In the dialog box I have a view panel where the first column is set to display a check box and the next column displaying some text. It also has a multi line edit box where the user can enter more information. What I want to happen is when the user selects a document in the view using the check box it puts the text in a viewScope variable. The user then adds additional information in the edit box and then clicks the OK button. The OK button gets the value of the edit box and combines it to the viewScope variable and then returns the combined value to the main document and closes the dialog box. When I use the first column as a link without the checkbox this all works. To help the user see what they selected I wanted to use the check box. When I use the checkbox option I get this returned in the field:
0 This is a test.
Where I added "This is a test" in the edit box. I get the same thing if I select multiple checkboxes. Not sure what I'm missing here, probably something really simple.
Below is the code.
onClick of the Checkbox - Server Options: No Update
var viewPanel = getComponent("viewPanel1");
var docIDArray = viewPanel.getSelectedIds();
var unidArray = new Array();
var sdatabase:NotesDatabase = session.getDatabase(session.getServerName(), "Support\\Lookups.nsf")
if (sdatabase.isOpen()){
for(i=0; i < docIDArray.length; i++) {
var unid = sdatabase.getDocumentByID(docIDArray[i]).getUniversalID();
unidArray.push(unid);
}
viewScope.preText = unidArray;
}else {
viewScope.preText = "Not Open";
}
OK Button Code - Server Options: Partial Update inputComments
var dialog = getComponent("dialogARExistingCondition");
var eCondition = getComponent("arExistingCondition").getValue();
var condition = viewScope.preText + " " + eCondition;
getComponent("inputComments").setValue(condition);
dialog.hide();