Sleepless night

Friday, November 1, 2013 10:13 AM UTC

Last night was a sleepless night - again. But this time it wasn't because I had enough sleep the night before (as we had a vacation day yesterday, yes "Halloween" - actually it is "Reformation Day" here). No, it was because I struggled until 3:00 AM with this homepage application.

I got it already working, my comment function and the list of all comments that belong to a post or a page. The key of that comment documents was the title but I decided to use an ID for that as it may be more comfortable and gives you the ability to change the title of the parent element without losing the relations. I also changed the way I opened the documents itself to the URL-way with the NoteID as an URL parameter. And that was the hassle...

The construct is the following:

The XPage contains a view data source which is category-filtered by the ID of the currentDocument. This view is the source for a repeat control that contains a panel with its own data source of type document. The document is being calculated by the UniversalID of the loop-document of that repeat control. I use a panel here to use the items directly, especially richtext content can be displayed without a hassle - if the document is accessed correctly!

The document wasn't cought correctly instead I always got the reference to the main document.

Simple reason: I forgot to set the ignoreRequestParameter property to true for that panel. Lessons learned: every panel without that setting will reference the document data source of the one that is referenced via an URL parameter. I knew that but did not recall it - until I tried to sleep, laying in my bed. There I got the idea and got up again and fixed the problem.

Sometimes it's strange how you get to a solution or an idea... Good night!

Leave a comment right here