• Unknown Command Exception readviewfast

    By Rob Porter 9 years ago

    Hi

    I get an error when I put a view grid on an XPage that also displays a document:

    HTTP Web Server: Unknown Command Exception [/mydb.nsf/0/A5DD183E1A2D5D7A80257D77003526EF/readviewfast]

    What I want to do is open a document and display a grid that shows a single category from a view based on a value on the document (like a single category view embedded in a form in a Notes client application).

    My code looks like this:

    Thanks in advance.

    • By F. Kranenburg 9 years ago

      Are you sure you have succesfully installed the ViewGrid plugin on the server? It looks like it couldn't find the REST API on the server.

      • By F. Kranenburg 9 years ago

        Try the demo application on your server and see if that works.

        • ,

          By Rob Porter 9 years ago

          The demo application appears to work on my server. The views render nicely. The only problem is none of the options (autoexpandfirst, categoryfilter and so on) work. For example, if I enter a categoryfilter (such as “GA”) and click the refresh button nothing changes. Similarly none of the other options work either.

          All the other things in the demo application appear to work okay. I can expand the categories and view the data. I can select documents and use the buttons to get the UNIDs and so on.

          In my own application I successfully created a view grid on an XPage. There are no other data sources on the XPage and the view grid works fine. When I added a view grid to another XPage that already had a Notes document data source, that is when the error occurred. An empty grid is displayed and the server console displays the error I pasted in to the first post on this thread.

          My server is release 9.0.1FP1 and I installed the plugin into my updatesite1.nsf database from the org.openntf.xsp.ViewGrid.updatesite folder.

          By the way, thanks for developing the view grid. I really like the features and I can see myself using it a lot in the future.
          ,The demo application appears to work on my server. The views render nicely. The only problem is none of the options (autoexpandfirst, categoryfilter and so on) work. For example, if I enter a categoryfilter (such as “GA”) and click the refresh button nothing changes. Similarly none of the other options work either.

          All the other things in the demo application appear to work okay. I can expand the categories and view the data. I can select documents and use the buttons to get the UNIDs and so on.

          In my own application I successfully created a view grid on an XPage. There are no other data sources on the XPage and the view grid works fine. When I added a view grid to another XPage that already had a Notes document data source, that is when the error occurred. An empty grid is displayed and the server console displays the error I pasted in to the first post on this thread.

          My server is release 9.0.1FP1 and I installed the plugin into my updatesite1.nsf database from the org.openntf.xsp.ViewGrid.updatesite folder.

          By the way, thanks for developing the view grid. I really like the features and I can see myself using it a lot in the future.

          • By Rob Porter 9 years ago

            Whoa! I don't know what happened to the above reply! Some sort of copy and paste issue. It looked fine before I clicked the OK button :) It appears to have duplicated the entire post. Sorry.

          • By F. Kranenburg 9 years ago

            Mmm very strange. Maybe there's something wrong with the generated html. Check your browser source where 'viewgrid' is really build. It should start with something like”

            require([gridType, “dojo/domReady!“], function(ViewGrid, ready){….

            Another thing, I've encountered some problems when using it in nested custom controls. At some point it 'converts' the whole compositeData object to a string and puts inside a property of the ViewGrid (you should see this happen in the browser source). But if you have other objects than String, Booleans or integers in one of the parent custom controls, this can go wrong. It looks like the compositeData object contains all parent custom controls options including any objects.
            You can test this by using the 'ViewGrid' custom control from the demo application (instead of the control in designer) and add a 'dump object' of the compositeData object inside it. If it contains any other objects rather than the direct properties of the 'ViewGrid' custom control than please let me know. I'll try to fix it in next release.