0

Hoping someone can point me in the correct direction for an XPages application we are writing inside the Domino Client (Notes?) viewer.

I have a view of documents which is being returned, this view has categories on it, and shows fine as this in an XPage, we now apply a filter to the view to limit it to specific owners of the documents, but as soon as we apply the filter, the categories disappear, which means we are left with a long list of documewnts, but unsorted - is there any way to display a filtered view in a categorized manner, on an XPage.

Moving further down my list, I also need to be able to select these documents (and one or many owners) to send to an Lotus Agent which will then create a JSON document to be sent to our friends at DocuSign requesting signatures from the selected owners on the selected documents. I'm not sure what an Agent is yet, but that is the goal ...

Caveat: I'm not a Domino developer, so excuse me if some of the terminology is incorrect.

neophytte
  • 648
  • 2
  • 11
  • 25

1 Answers1

4

Categorised views are a very "Notes" construct. When you filter a view, it will only show documents, but not categories. While they are practical in the back, they are cumbersome in the UI.

There are a few design considerations how to tame them in a webUI. However if your users love them, you might consider to flatten them out and recreate the categories in the UI (client side) only.

The actual better way for your use case: add another view that is firstly categorised by the owner and secondly by your category. Use the category filter of the view control to limit the documents to that author. This should do the trick. Eventually use one of the controls from the extension library.

For the agent: don't bother, that's "old Notes speak". An agent would be a piece of code (LotusScript or Java, but since you do web interaction: Java) that gets triggered by an event: manual, on schedule, on document create/update (with some delay).

Since you are in an XPage, you have easier options at your disposal: create a Bean that has the JSON format you need, add a method that takes a Notes document as parameter to populate it, something like public void populate(final Document doc) {...} and use e.g. the GSON library to simply marshall them to JSON (or a collection of them). The GSON library probably is on a current Domino, I put it there as part of VoP 1.0.

Then use a managed bean to talk to Dokusign. When traveling down the managed bean road is is much easier to test than trying to mess with agents.

Hope that helps and ask more questions! (Check the Learning XPages Cheatsheet too)

stwissel
  • 20,110
  • 6
  • 54
  • 101
  • Thanks for the response - prior ro receiving this the boss and I nutted out a few scenarios, and came up with a similar option to your first Balsamiq mockup, however rather than a clickable listbox, we have a list of checkbox(es) and a "Filter" button at the bottom - my next challenge is to get the value of the element selected to add that to the filter of the SQL statement that is being run through the openNTF JDBC driver thingy - which will probably be my next S/O question .... – neophytte Sep 28 '17 at 01:30
  • 1
    You are probably better off using a FTQuery instead of adding a SQL to the picture. FT is build in. SQL bolted on – stwissel Sep 28 '17 at 01:40
  • Is there any pages/documentation you can point me to for the FTQuery - the pages I see on Google point me (mostly) to an "eXist-DB", and we are trying to access the data in a pre-existing MS-SQL database (and the SQL is pretty much the only part that makes sense to me, in line with my caveat above :)) – neophytte Sep 28 '17 at 02:21
  • Syntax is here: https://www-10.lotus.com/ldd/dominowiki.nsf/dx/full-text-syntax and there's the Java API https://www.ibm.com/support/knowledgecenter/en/SSVRGU_9.0.1/basic/H_FTSEARCH_METHOD_DB_JAVA.html (also for Views) – stwissel Sep 28 '17 at 05:59
  • Just a little caveat of FT driven views: we built a lot of applications around it and the main problem is delay after document create/update - it won't show correct data until FT updates. – Frantisek Kossuth Sep 28 '17 at 09:12
  • @FrantisekKossuth, ah, but you can add code that updates the FT when the user saves a document. (Brad and Kathy did that for us, so I don't deserve any credit for the idea) – David Navarre Sep 28 '17 at 14:46