The code which i nicked from here:http://dominoextnd.blogspot.com/2009/02/xpages-hide-whens-formulas-and-user.htm
is:
context.getUser().getRoles().contains('[RoleName]')
you can use this in a visible (hide when) formula.
I have a convert to xpages routine please try it out http://notesninjas.com/Utils.nsf/ConvertAtFunction