XPages and Me

My Journey into XPages Development

Tag Archives: SSJS

sessionAsSigner Oddities – Part 1

During a recent project, I had to start using sessionAsSigner in my SSJS.

For those of you, who don’t know what sessionAsSigner does: It allows a current user, to run code and do things he usually wouldn’t be allowed to do, due to his access level for a certain application. sessionAsSigner runs the code with the access level of the signer of the design element. So, whoever touched the XPage or Script Library last in the designer, this person’s access rights will be used for sessionAsSigner. That means, if you roll an application out to production, make sure all design elements are being signed with the admin ID.

Though it works very well, I also ran into some odd behavior while using it. I am not sure if this is going to be a whole series (as I don’t know if I’ll encounter any more issues), but I thought I’ll start it out as one, just in case.

So, what happened? In this particular instance, I wanted to read the content of a rich text field as MIME Entity. I’ve used that in several other projects and it worked very well.
Read more of this post

Diving into Bootstrap and Font Awesome – Part 3: Displaying / Hiding Content Based on Device Type

When designing an application, that is going to be used on different devices (desktop, tablet, mobile), your design for each of the devices might be very different from each other. Thus, you need to make sure that each design is only being displayed on the device type, it was designed for.

Obviously, you can create different custom controls that will contain the UI for the different devices. But how to hide or display them? It is not very hard to check the screen’s size with client-side javascript, but how do I pass that on to a rendered property?

Here is one way to do it:
Read more of this post

Dabbling in Bootstrap and Font Awesome Part 8: DB Profile and Theme

As I’ve mentioned in my previous post, I have a DB Profile document where I can set the Bootstrap navbar type, navbar look, navbar container and the content container I’d like to use across my whole application. It also contains a setting for the Bootstrap field size (read more here) and in this post, I am going to explain how I reference and use that setting in my theme.

Read more of this post

Dabbling in Bootstrap and Font Awesome Part 6-5: (re)Use Me!

Today, I will enhance the FA Icon custom control from one of my previous posts

Enhance the existing FA Icon Custom Control:

“So, how are you going to enhance the custom control?” , you ask. “It already is perfection.”, you say. Well, thank you for the compliment but there is almost always room for improvement. So, I am going to add additional “Property Definitions” that will allow you to add Bootstrap helper classes to your icon. Sounds intriguing, doesn’t it?

Read more of this post

XPages Tip: Setting a Date Field with @Now

Ran into the same issue as Brad and thankfully I found his blog and this entry:

XPages Tip: Setting a Date Field with @Now.

Thank you Brad for putting it out there.