judy kilpinen commented on Feb 3, 2012

Re: XPages - How to pass a Document Data Source to a Custom Control

.... lost my last line due to tags .... [xc:ccContentLink entryDataSource="#{rowEntry}"][/xc:ccContentLink] replacing the sq.brackets by angle brackets.

judy kilpinen commented on Feb 3, 2012

Re: XPages - How to pass a Document Data Source to a Custom Control

@Matthew, Here's how I got around that "primitive" error. On my custom control, manually enter in the "Type" field on the Property Definition panel "com.ibm.xsp.model.ModelDataSource" (without the quotes). It's slightly different than what you get by picking DataSource from the Complex Types drop-down (8.5.2) & I'm not sure it makes a difference, and then leave my "Editor" field as "String value".

Then when I'm calling the custom control in my XPage, I use EL to pass in the datasource name.

So if I've got my custom control inside a viewPanel column, or a Repeat, I pass the NotesXSPViewEntry object like so:

Mike Woolsey commented on May 25, 2010

XPages - How to pass a Document Data Source to a Custom Control

I'm going to experiment more with this technique, but I'd actually just like to learn how to do this with a form-like control, selected by a view-like repeat control. IOW, a user would select a document from the view-like control, which would be used to populate and then update the form fields beneath it without a Page reload. This sounds close ... but it'd be great if you've done this or tried it, if you have more information how that may work.

Matthew P Fox commented on Mar 23, 2010

XPages - How to pass a Document Data Source to a Custom Control

This method doesn't appear to work anymore in 8.5.1. If you choose DocumentDataSource for the property type, you cannot compute it when you add the custom control to an XPage. You get a "+" icon to add a document data source, and where you go from there is anyone's guess. I have tried editing the source to compute the property as above, but that just gives an error that the value of the property cannot be a primitive. I have also tried adding the data source and then computing the documentId, which sets the property to an object of type com.ibm.xsp.model.domino.DominoDocumentData. What do you do with that?

Sheryl C Banks commented on Dec 15, 2009

XPages - How to pass a Document Data Source to a Custom Control

I'm just now starting to develop with XPages so I have a couple of, what may be very elementary, questions on this post.

Could you give an explanation of...

1) How this differs from selecting a data source(s) on the Data tab of Xpages' Properties sheet?

2) What are the advantages of the method you've described, including when it would be more feasible to use this method vs. the Data tab?