XPAGE CUSTOM CONTROL LOADING EXISTING VALUES INTO TABLE

Ankit Singh

Total Post:341

Points:2389
Posted by  Ankit Singh
JSON 
 1369  View(s)
Ratings:
Rate this:
Any help on above is really appreciated.

I have an XPage with a custom control ccxGrid. In this custom control, it calls another XPage that builds a JSON string that in turn populates the table on the main XPage. My issue is that when the page is refreshed the same documents are added to the table again and again. Is there a way to check if the document is already in the table to not add it? Thanks in advance.
  1. AVADHESH PATEL

    Post:604

    Points:4228
    Re: XPage custom control loading existing values into table

    Hi,


    Here's an answer based on my comment above. Use a viewScope variable that you set initially and check on every build of the JSON string:

    if (!viewScope.alreadyHandled) {
        viewScope.alreadyHandled = true;

        // Do your JSON string processing
    }

Answer

NEWSLETTER

Enter your email address here always to be updated. We promise not to spam!