Skip to main content link. Accesskey S

The useful resource for IBM Lotus Domino XPages development

Submit Search


Home > UI > Work with Hide When on a XPage
xpageswiki.com
is maintained by 
Julian Buss.
and hosted by laurus.ch.
Julian Buss
Created by Miguel Angel Villafuerte on 19.08.2013 07:15:34

Hi Julian:

Excellent content ! This has helped me so much... It is possible to contact you !? We want to see if you can offer us a XPage crash course.

You can reach me at: mavf@nomada.com.mx - WhatsApp MX: +52 1 811 778 9397 - Skype: ddinsys

Kind regards,

Miguel Angel Villafuerte Fernández


Created by Johann Echavarria on 02.04.2014 17:00:00

Another simple way:

context.getUser().getRoles().contains('[RoleName]');


Created by Johann Echavarria on 02.04.2014 17:24:20

In

http://www-10.lotus.com/ldd/ddwiki.nsf/dx/X-Pages_Hide_When_Based_on_User_Role

They mention that it can be a cache problem with:

context.getUser().getRoles().contains('[RoleName]');

So it can be better what you suggest and may be replacing @IsMember() for contains() :

database.queryAccessRoles(session.getEffectiveUserName()).contains('[RoleName]');