Tag Archives: Extension library

Preventing the XPages Dialog control to auto center

If you ever tried to use a XPage dialog control from the extension library on a mobile device. You’ll probably seen this behavior, the dialog is moving away each time you try to click on a button or a field in the dialog.

The trick to fix this is to force the dialog to a fixed location if you are on a mobile device with a small screen.

There are several ways to detect this:

check out this stackoverflow question how to detect iphone by CSS –>Link

You can use this xSnippet –> Link or this post by Keith Strickland –> Link

When you can detect this and depending on your approach place the following code in a stylesheet

or if you place it directly as a computed style on the dialog.

The following css properties is that makes the dialog to stop moving around. 

top:100px !important;
left:100px !important;

This will force the dialog to be placed at position 100,100 on screen. !important is a css property that forces an override of other properties set.

So what I usually do to fix this is add the xSnippet in a SSJS Scriptlibrary and add the following code as a computed style property on the dialog 

if(isIphone()||isAndroidCheck()){
return "top:100px !important;left:100px !important;"
}

Enjoy your mobile application 

My top 5 things that we need in XPages


1. Better Client and OS integration
You need to be able to do things in an XPage that you are used to in an ordinary client.

  • Copy and paste images into the rt field
  • Communicate with the eclipse client framework
  • Integration with other desktop applications
  • Finally get a full integration with symphony documents.
    (Open them directly from an XPage thru code, create from template, set content in Symphony)
2. Integrated Debugger and Memory profiler
Checkout the debugger in visualstudio this is how the debugger should work in my opinion. Start debugging in client code continue over in server side code and back again. NICE ;-). Memory profiler that is built in would also be great and not just for test environments (When do you really need them ? ).
 
3. More error handling in the designer
Today in the designer you can make errors easily that you will have a hard time finding.

 

4. WebServices
In all other modern development environments webservices is used alot. We need support for Webservices in XPages both in code and as a datasource.

 

5. Integrated Extension library
We need the extension library to be integrated into the server and client install.
If it’s installed. It’s also updated like you update Firefox or Chrome, automatically!

 

This is my top 5 things, no specific order. What are yours?