5
votes

I have a fairly straightforward and common use case. A panel, in which resides a repeat control. The repeat control gets its content from a view lookup by key. Below that repeat control is another panel. This panel has a data binding to a new notesdocument. The panel has a couple of fields on it for the new document and a submit button.

It all works, however after submit (presumably in the "postSaveDocument()" event) I want to call back up to the repeat control and have it re-perform its lookup and refresh its content.

I'm looking to understand syntactically, how I can reference the repeat control and its properties and methods from elsewhere on the document -- and secondarily (though I can look this up once I get the first part figured out) what the refresh() method would be for that that repeat control.

Ideally, I think its something like: xp:page.repeatcontrolname.refresh() -- though I know that isn't right.

I'm sure once I see an example, it will apply to a myriad of other things.

Update :

I discovered that the repeated elements were actually refreshing but I wasn't seeing a new entry added to the list. The reason, ultimately, turned out to be that to add another entry to the repeat list I needed a new "control" -- but I'd checked that box (on the repeat control) that said "Create Controls at Page Creation". It was preventing my XPage from creating another entry for the new document to display!

3

3 Answers

7
votes

This article explains the syntax for doing what you describe:
http://avatar.red-pill.mobi/tim/blog.nsf/d6plinks/TTRY-84B6VP

5
votes

I have a feeling that this one captures the actual use case.

http://www-10.lotus.com/ldd/ddwiki.nsf/dx/Create_and_display_responses

The key setting that people tend to miss is "ignoreRequestParams".

1
votes

Andrew,

The 'XSP.PartialRefreshGet' call was broken in Domino release 8.5.3 which results in the '_c9 is undefined' error.

Have a look at the article posted by Tommy Valand:
http://dontpanic82.blogspot.com.au/2012/03/patch-for-bug-in-xsppartialrefreshget.html

Basically to work around the problem a second argument is required to be passed to the call, for example:

XSP.partialRefreshGet("#{id:ExistingDevicesList}", "")