Mar 18, 2015, 10:08 PM
94 Posts
topic has been resolvedResolved

Why won't a view panel show docs when the client will?

  • Category: Debugging
  • Platform: Windows
  • Release: 9.0.1
  • Role: Developer
  • Tags:
  • Replies: 13

My customer wishes to access documents from a separate Notes database.  We currently provide this capability with a picklist in a Notes client application.  So, I simply added a view panel to my xpage and then discovered that the view comes up blank.  I get the pager and the column titles, but that's it.  Using the picklist in the Notes client brings up the view with documents just fine (and has for many years).  My id used in the client has the exact same access rights as the id used in the browser. 

I tried creating a new view, same result.

No errors, but no documents either.  I found a post about a problem with the "dont show empty categories" checkbox, but this is not checked.    the view is categorized by the first column and the second column is sorted ascending.

It seems as though there is some security somewhere that's preventing the documents from showing in a browser view panel - doesn't make any sense, but that's how it acts.

Any ideas?

Mar 19, 2015, 8:48 AM
589 Posts

What is the code you're using in XPages?

Are you doing a filter based on the current user name by any chance?  

Remember in XPages if you call a method that returns a user name it typically returns the servers user name.  You often need to so something like session.getEffectiveUserName().

I would think something like this is your problem.

Mar 19, 2015, 9:09 AM
94 Posts
no, no category fitler

I'm not using any filter - category or searching.  I'm just trying to get the data to show first, then I'll mess with filtering.  I've used a view panel many times before, so I must be missing something simple.


Mar 19, 2015, 9:59 AM
589 Posts

So no readers fields at play here?  This is just a <spit> straight view control?

Assuming no readers... the only other thing that jumps out at me is the  view control doesn't like some types of columns...  I forget the rules...  if the column is based on a field you should be good..  (which I assume it is in your case)...  of the column is some kinda if literal then it's like it doesn't exist...  something like that...

Now there is also security on views isn't there?  To prevent web access?  

hmmm not sure about this one at the moment.  You might need to post it on StackOverFlow...  a lot of people smarter then me monitor that one...



Mar 19, 2015, 10:59 AM
453 Posts
as I have previously said I don't like viewPanels but

that should not be the issue here. Why not try a quick & dirty repeat control instead just to see what is being returned. I find the repeat to be easier to control and if I'm having trouble such as you are I find it easier to debug. Once you have figured out the access issues you can move back to a viewPanel if you want to.

Mar 19, 2015, 11:47 AM
94 Posts
Not a Readers issue...

I can access the view and documents in the Notes client using the same id, so it's not a Readers field issue.

I'll try a repeat control this afternoon and let you know the results.

Mar 19, 2015, 1:21 PM
589 Posts


You're not saying there are no Readers fields...  you're saying the same id shows the document in the client. We know the client works...  that doesn't exactly mean XPages works the same way become in some situations the environment is using the server name and NOT the user name.

Are there readers fields being used in these documents?

Mar 19, 2015, 1:54 PM
94 Posts
My results from trying a repeat control...

Yes, David, these documents do use Readers fields.


My results from trying a repeat control...

NotesException: Notes error: You are not authorized to perform that operation ((DocNumLkp))


Since the view as categorized, I had the Category value set.

So, maybe there's some funny deal because it's a hidden view.  I tried another unhidden view and got the same error.

I removed the Category value and then I didn't get an error, but the repeat.getRowCount returned 0

Mar 19, 2015, 2:22 PM
94 Posts
result from using a simple view url

Howard, I tried a simple view url and got this - which seems strange, because I can use this id to open the db and this view in the client just fine.

I get the sign in screen.... "Bob Cross, you are not authorized to access folder/subfolder/db.nsf/(docnumlkp)  Please sign in with a name which has sufficient access rights."

Mar 19, 2015, 3:07 PM
589 Posts

ok  no readers fields  cool...


There is a lesser known setting in the ACL for Maximum Internet access...  something like that...  you should look for that.  Also try to just do a classing domino url to open the view...  Let's see if it's xpages specific or just web as a whole.

Does the database have a default view?  It used to be an issue for some things... not sure if it still is or not.  At the moment I'd have to bet on the ACL being an issue with that internet access thing based on the not authorized message...

Mar 19, 2015, 3:31 PM
298 Posts
Another gotcha
You have to make sure the view is set to allow web users to use it (don't hide the view from web users in the view design list). Even though you are not specifically accessing the view in a browser, using the view in the view control, etc. will still fail.

Mar 19, 2015, 3:17 PM
94 Posts
BINGO David !!!


That looks to be it!!!  Unfortunately, I don't have access to change it.  I'll get with the customer and see if we can get that setting changed.

THANK YOU all for your responses.  Of course, the solution is easy once you know it!

(oh, one correction, David, docs in this db do use Readers fields - so I hope those don't bite me after I get this changed)