Hello all,
I’m stuck with xpages. I try to create a repeater control. Inside a computed field I try to generate with javascript some client javascript to display a dojo popup. My problem is to get the row object to get the doc unid of the row to display the data in the dojo dialog… I have read a lot of sample but no way to find the solution.
Any ideas ?
Regards !
Subject: Client-side JavaScript doesn’t know anything about repeater rows…
so there is no client-side row object to get. But if you need the UNID of the document, you can do a javascript insert to have the server calculate part of your client-side code as the page is being rendered.
Subject: I case it’s not obvious…
- Client side insert is the “#{javascript:some server side computation}” thing. Like computed text, only better…
Subject: Pass the information back via scoped variables.
Subject: oops
Hit enter too soon.
In your repeat control you need logic to pass the current details into the scoped variables. From there other parts of the page can access it.
http://www-10.lotus.com/ldd/ddwiki.nsf/dx/xpages-scoped-variables.htm
Subject: Thank you for your responses… but…
Thank you all for your help.
As a notes developper I’m evaluating the new xpages to see if I can go with it to rewrite (improve) a lot of notes application.
Before xPages I used to use view and jquery javascript lib. It was so simple to compute some javascript and pass the doc unid as a parameter of a client javascript function… but with xPages this drives me crazy.
For example I have write a function which display a dojo dialog to do some view editing. I have add a button called “edit”. I have had some client javascript to call my dojo function. I want to get the row document unid as parameter of the function… how to get it and how to pass it to the function ???
My feeling concerning xpages is just in between… I can feel a real power behind the xPages but I’m stuck to find the way… I’m searching for declick but for now I found xpages a little bit tricky, isn’t it ? for now I have read every article about xPages but no feeling at the moment.
Greetings !
Subject: To expand on my earlier response
As I have done this before.
I have a tab bar which has a repeat control. The index is called “tabListIndex”
When the user clicks on the repeat control I do the follow:
viewScope.selectedTab = tabListIndex
I then have a separate section on the XPage which detects that “viewScope.selectedTab” has changed and updates that area with the new details.