329 Lotus blogs updated hourly. Who will post next? Home | Downloads | Events | Jobs | Twitter | Bookmarks | Pods | Blogs | Search | myPL | About 
 
Latest 7 Posts
Fix for partial refresh on Dojo Tab Container/Content Pane
Wed, Mar 20th 2013 216
Small LS class that can be used to check if fields have changed
Fri, Jan 18th 2013 386
Code Snippet - Close dialog if all fields are valid
Fri, Oct 12th 2012 260
Snippet to clear session for user
Thu, Sep 6th 2012 268
Comprehensive guide to Design Definitions
Mon, Aug 20th 2012 129
XPages - Grouping data in comboboxes
Fri, Jul 27th 2012 215
Multi value fields and Beans in XPages
Mon, Jun 25th 2012 303
Top 10
Small LS class that can be used to check if fields have changed
Fri, Jan 18th 2013 386
XPages: SSJS code snippet that lets you parse/stringify JS-JSON
Wed, Sep 29th 2010 335
Multi value fields and Beans in XPages
Mon, Jun 25th 2012 303
XPages: Code snippet for Multi Value Custom Converter
Thu, Jun 17th 2010 282
Simple trick to format XPages Checkbox group
Thu, Apr 14th 2011 278
Snippet to clear session for user
Thu, Sep 6th 2012 268
Code Snippet - Close dialog if all fields are valid
Fri, Oct 12th 2012 260
XPages: Simple function to clear scoped variables
Thu, Jun 24th 2010 221
XPages: Make categorized views behave
Fri, Oct 22nd 2010 220
Fix for partial refresh on Dojo Tab Container/Content Pane
Wed, Mar 20th 2013 216


Simple API tester - SSJS bugs remain
   

A couple of years ago I blogged about bugs in Array.splice, String.match with global modifier, and String.replace with function as parameter.

I did a little test on the current beta of 8.5.3. Guess what. Two years later, the bugs still haven't been fixed.

I made a small API tester utility that you can set up tests for the API/expected result. In the demoapp, there are tests for the bugs that I'm aware of. It's quite simple to set up. Do the test in Firebug or a similar JS console. Copy/paste the expression, and the result into the fields in the XPage. Run test to see if the result is what should be expected.

>> Download API Tester

Disclaimer:
This is beta software from IBM and does not represent a commitment, promise or legal obligation by IBM to deliver, in a future release of Notes/Domino or Lotus Notes Traveler, any material, code or functionality described/shown in this presentation.


---------------------
http://feedproxy.google.com/~r/dontpanic82/~3/kLEctgKhq9I/simple-api-tester-ssjs-bugs-remain.html
Jun 13, 2011
84 hits



Recent Blog Posts
216


Fix for partial refresh on Dojo Tab Container/Content Pane
Wed, Mar 20th 2013 4:05a   Tommy Valand
I wrote this a while back, but I couldn't find that I'd shared it. You need to use the partial refresh hijacker to use the code snippet. This code snippet initializes Dojo Tab Containers/Dojo Content Panes in the area that's refreshed: // Fix problem with partial refresh on Dojo Tab Container/Content pane // Source for inspiration: // http://www.openntf.org/projects/pmt.nsf/0/D228115FAA98DDEC86257A7D0050E7FF dojo.subscribe( 'partialrefresh-complete', this, function( method, form, [read] Keywords: xpages dojo openntf widget
386


Small LS class that can be used to check if fields have changed
Fri, Jan 18th 2013 3:02a   Tommy Valand
We've had some issues with semaphore locks on one of our import databases. The import database has routines that import/update data, then replicate it to a cluster when it's done. We're not exactly sure what triggers the locks, but the server crashed sometimes several times a day, so we decided to see if the import routines could be optimized to do as few writes as possible. Several of the routines saved documents even if there were no field changes. I wrote a simple class to test for [read] Keywords: database server
260


Code Snippet - Close dialog if all fields are valid
Fri, Oct 12th 2012 12:42a   Tommy Valand
Today I was working on a dialog that had fields with validation. I only want to close the dialog if all fields are valid. I'm not aware of any inbuilt XSP methods that does this. This code snippet checks for any invalid fields in the dialog. If all fields are valid, the dialog is closed: function closeDialogIfValid( dialogId ){ var invalidCount = dojo.query( '[id="' + dialogId + '"] [aria-invalid="true"]' ).length; if( invalidCount === 0 ){ XSP.closeDialog( dialogId ); } } This pr [read] Keywords: blogger dojo server
268


Snippet to clear session for user
Thu, Sep 6th 2012 4:42a   Tommy Valand
During testing, I sometimes log in as different user to test hide/whens/etc. I used to delete the SessionID cookie in the browser to clear session scoped beans/sessionScope variables. Today, I looked for a solution to automate this. This line will clear all objects related to a session:facesContext.getExternalContext().getSession( false ).invalidate(); If you want to clear session when logged in user changes for the current "XPages" session, here's the snippet I use (put the code in afterPa [read] Keywords: xpages blogger server
129


Comprehensive guide to Design Definitions
Mon, Aug 20th 2012 6:26a   Tommy Valand
I found this guide in IBM's Application Development wiki while looking for information on Design Definitions: Native and Custom Control Custom Visualization Best Practices So far it's the most comprehensive guide to Design Definitions I've found. [read] Keywords: ibm ldd lotus application blogger development wiki
215


XPages - Grouping data in comboboxes
Fri, Jul 27th 2012 6:29a   Tommy Valand
I wanted to have some values grouped in a ComboBox. Not sure if it's possible to do with pure SSJS (without using the Java API), but found a way using beans: JSF Tree in a dropdown (see accepted answer). The resulting html is select node with options grouped in optgroup nodes. [read] Keywords: xpages blogger java




303


Multi value fields and Beans in XPages
Mon, Jun 25th 2012 4:10a   Tommy Valand
I had an issue with multi value fields bound to bean fields in an XPages I worked on. I got this error message on refresh: java.lang.IllegalArgumentException: argument type mismatch The issue turned out to be a somewhat inconsistent underlying API. When the field is empty, or has single value, it tries to set a string. When there are multiple values, it tries to set a list. To work around the issue, have the getter return an Object, and the setter accept an object. E.g. public Obje [read] Keywords: xpages blogger java
154


Update for Enhanced Messages Control - Show "system" messages
Fri, Jun 22nd 2012 9:50a   Tommy Valand
In response to this question on the XPages Forums, I've updated the source code for my Enhanced Messages Control, so that it also shows messages not bound to controls. The "system" messages are show above the messages from components. [read] Keywords: ldd lotus xpages blogger
121


Recommended tutorials for doing asynchronous processing in beans
Fri, Jun 15th 2012 6:29a   Tommy Valand
Asynchronous processing in Java applications – leveraging those multi-cores Using asynchronous mechanisms in Java and JavaScript for improving the user experience [read] Keywords: applications blogger java javascript
97


Update for Enhanced Messages - Now in page order
Fri, Jun 8th 2012 3:49p   Tommy Valand
I added a small snippet of code that sorts the messages in the order that the components are in the page. I only had a simple page to test on, but in theory it should work for large pages with complex structure. Original post with source code for custom control [read] Keywords: blogger




Created and Maintained by Yancy Lent - About - Blog Submission - Suggestions - Change Log - Blog Widget - Advertising - Mobile Edition