Category Archives: XPages - Page 2

Strange XPage error on the console.

>I got a strange problem displaying on the Domino console

HTTP JVM: com.ibm.xsp.exception.EvaluationExceptionEx: Error while executing JavaScript action expression

The application works with no problem but this is showing on the console every 5 minutes on the console. Then I found that the error was a error inside the code in beforeRenderResponse event.
If found this by adding
try {

}catch(e){
print(e.toString())
}
around my code.

How do I create a editbox connected to a richtextfield

>

Is there a way to create a editbox with Xpages that is connected to a richtextfield in backend and to avoid The 64k limit.

There is probably a easy solution, please comment if you know the answer.
BlogBooster-The most productive way for mobile blogging. BlogBooster is a multi-service blog editor for iPhone, Android, WebOs and your desktop

Extension library dynamical treenodes

>Is it possible to create TreeNodes thru code to populate for instance a pagenavigator object from the extension library?

I know about the bean object but how should the bean look like can’t find any examples?

Can it be done with out a bean object?

Multi level navigator for XPages

>Anybody built a 2 level navigator for XPages, like an outline that folds out

the second level when clicking on the first level?

UserRoles in ACL takes forever to apply in Xpages

I have tried a simple test I have a user direct in the ACL. The acl has two roles

User and Admin.
In the XPage I have a button that has a hide when formula that looks like this
if(context.getUser().getRoles().contains(‘[Admin]’)){
return true;
}
return false;
I have also tried
database.queryAccessRoles(@UserName())
But it also have the same effect this takes forever to apply If I add the Admin role to a user.
But if I have a notes form with a field and in that field I add @UserRoles
I just have to reload the form and the new user role apply.

I have tried using show nlcache reset ( tip from Erik Brooks) but it has no effect.

If anybody have an idea how to make the acl change apply also in XPages please feel free to comment.

XPages Event parameters solution found

>It’s very interesting that event parameters retrieval is totally undocumented and there is no articles / blogentries about it on the web. You should know that I have been searching and trying to get the solution thru the community but with no luck.

 
But Now I have found the solution
 
When triggering a onClick event the this object will contain a XspEventHandler and
this object has a method called getParameters() this method will return a Java ArrayList.
The arraylist will contain the parameters with name and value.
So to print all parameters you can walk thru them like this
 
var value=this.getParameters();
var tmp=””;

for(x=0;x

tmp+=value.get(x).getName()+” – “+value.get(x).getValue();
}
 
tmp will then contain a string will all the names and data of the event parameters for you to display.

Check out my article in the application development wiki

>Anybody know how event parameters work in XPages

>I have been searching for information on how to retrieve them but with no luck.

It’s probably dead simple but I don’t know how. If you do please send me and comment 😉
The solution
http://everythinglotus.blogspot.com/2010/09/xpages-event-parameters-solution-found.html