Reputation: 506
I have 2 domino views bound to an xpage. view1 and view2. In a repeat control I would like to calculate to which view I want to bind the repeat control.
In the repeat control, data, value , you have for example # view1 ,(as data source) if you don't calculate anything. When I use ssjs and I return view1 , it's not working.(the repeat control doesn't bind to view1)
What do I have to return in ssjs to bind the repeat control to view1 ?
Upvotes: 0
Views: 195
Reputation: 4471
The value of the "view1" variable from a view data source is a little unusual, in that the binding to a repeat/view/etc. deals with the data source as it is, while the value in an SSJS context is the lotus.domino.View object itself, which is different.
In any event, though you CAN compute the repeat's binding on page load (by using page-load-sexecuted SSJS to return a value binding string, e.g. value="${javascript:'#{' + (someCondition ? 'view1' : 'view2') + '}'}"
), you'd probably be better off computing the viewName property of the view data source instead. That should behave a bit more like you'd expect.
Upvotes: 1