onsdag 30 mars 2011

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.

söndag 27 mars 2011

Making the resize of XPage Datefields work like they should

I found when creating an application that I couldn't resize a date field. The date picker mover to a second row and that wasn't what I wanted.

And I didn't want a large field because I was only storing a short date in ISO Date format.
I started to investigate why the helper icon was moved to the second row and found that a style width was inherited down in the date field control. This made that the text field storing the date was as big as the surrounding span and that made the helper icon to pop down to the second row.

I thought that I could fix the problem in the Dojo Widget but I couldn't find any event to attach my code to that fired when the compilation of the widget was done. So my choice fell on implementing this as a Dojo onload event fix.


XSP.addOnLoad(function() {
dojo.query(".xspInputFieldDateTimePicker").forEach(function(node, index, arr){
var containerId = node.id;
if(containerId.length>=10){
if(containerId.substr(containerId.length-10)=="_Container") {
var subid="widget_"+containerId.substring(0, containerId.length-10);
if(node.style.width!=""){
var sub=XSP.getElementById(subid)
if(sub){
if(node.style.width==sub.style.width){
var width=sub.style.width.substring(0, sub.style.width.length-2);
if(width>33){
width=width-33
sub.style.width=width+"px";
}}}}}}});});

Place the code within a output script on a custom control or in a script library and add it to you xpage with the fields. It can handle one or multiple date fields. It will only manipulate fields with the width style added.

torsdag 24 mars 2011

The new homepage

The firm that I work for has a new webpage

Check it out www.QNova.eu



tisdag 8 mars 2011

IBM continues with Nokia and no Windows Phone 7

IBM announced today that the continues the plan for supporting Symbian^3 later this year.
No plans for Windows 7 Phone support, still applys.

Is there anybody that uses a Windows Phone 7?

https://www-304.ibm.com/support/docview.wss?uid=swg21470120

fredag 4 mars 2011

NotesRichTextRange ReplaceAndFind clears the RichTextItem or gives a crash

If you are using this function in Lotusscript (haven't tested Java) and replacing text that has the property passthruhtml beware that the Richtext item will be cleared if the RichText item data is larger than 64K, I can't wait when the 64K limit gone from Domino!!!

Another enoying bug is that if you do alot or replacements the client/server will crash.

The bugs in reported to IBM, and I will comeback with when they are fixed. They are reproducable so I'm confident that IBM will fix them.