JeanLouis V commented on Aug 22, 2012

Can we sort out the response view so that most recent posts appear at the top?

Great wiki, I believe that those kinds of Response forums should be part of any XPage application.

But I can't help to notice that the method:

var doc = dominoDoc.getDocument();

doc.getResponses();

displays the oldest responses at the top of the view, and the most recent ones at the bottom.... which is a bit of the pain, users expect to see the most recent posts at the top of the view.

Is there any solution?

Thanks, JeanLouis

Robert F Harwood commented on Jan 13, 2012

Re: Create and display responses - XPage enabling an existing Notes client application

check formatting

Steve Cochrane commented on Aug 22, 2011

Re: Create and display responses - XPage enabling an existing Notes client application

Thanks! This is my first foray into XPages and it's a nice way to build websites. I have a quick question... instead of having a "Read" and "Edit" custom control, is there a way to simply change one custom control's document readonly to true instead? If you have some very difficult complex forms, it'd be great to do just one.

Thx!

Steve in NYC

Joacim Boive commented on Feb 25, 2011

Re: Create and display responses - XPage enabling an existing Notes client application

@Sean - It's not needed.

You don't need to specify the parent ID of the repsonse form when you define the data coupling. Simply leave the Parent ID blank.

Since the button to reply uses: dominoResp.getDocument().makeResponse(dominoDoc.getDocument())

The document is created as a response regardles. If didn't use this code then you would need the scoped variable.

@Authors - Great work! Helped my a lot!

A minor addition though: You don't need to change the type of the submit button for the ccFormResponse. You can simply modify the basics / loaded - attribute of the ccFormResponse custom control: !dominoDoc.isEditable();

Since it's not loaded when the parent is submitted the data source isn't available and thus isn't saved. That's how I understand it anyway. I would assume this approach also saves some memory compared to not rendered...

/J

sean cull commented on Feb 12, 2010

Create and display responses - XPage enabling an existing Notes client application

It would be useful if you could explain how requestScope.parentID gets set - see http://www-10.lotus.com/ldd/ddwiki.nsf/dx/Create_and_display_responses#Create%20the%20custom%20control%20ccFormResponse

Thanks, Sean