358 Lotus blogs updated hourly. Who will post next? Home | Downloads | Events | Pods | Blogs | Search | myPL | About 
 
Latest 7 Posts
Dynamically pointing DomSQL to current database
Tue, Jan 28th 2014 108
HTML5, script tags and partial refresh inside target area
Mon, Jan 27th 2014 125
Configuring input field for DateTime picker with localized date/time format
Tue, Oct 8th 2013 139
Simple workaround for partial refresh issues with radio buttons
Mon, Sep 23rd 2013 103
Strange implementation of Document.setPreferJavaDates( true )
Thu, Sep 19th 2013 103
Workaround for issues with XPage in iframe on external website
Wed, Jul 3rd 2013 115
Benchmark: Fetching NoteIDs and documents from view
Thu, Jun 27th 2013 77
Top 10
Fix for partial refresh on Dojo Tab Container/Content Pane
Wed, Mar 20th 2013 140
Configuring input field for DateTime picker with localized date/time format
Tue, Oct 8th 2013 139
Multi value fields and Beans in XPages
Mon, Jun 25th 2012 131
HTML5, script tags and partial refresh inside target area
Mon, Jan 27th 2014 125
Workaround for issues with XPage in iframe on external website
Wed, Jul 3rd 2013 115
Dynamically pointing DomSQL to current database
Tue, Jan 28th 2014 108
Strange implementation of Document.setPreferJavaDates( true )
Thu, Sep 19th 2013 103
Simple workaround for partial refresh issues with radio buttons
Mon, Sep 23rd 2013 103
Simple trick to format XPages Checkbox group
Thu, Apr 14th 2011 102
Snippet to clear session for user
Thu, Sep 6th 2012 95


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
39 hits



Recent Blog Posts
108


Dynamically pointing DomSQL to current database
Tue, Jan 28th 2014 3:02a   Tommy Valand
I couldn't find a way to specify current database in the .jdbc file, so I dug around in the API. When creating the connection to a DomSQL database, you can do it with getConnection and the name of a .jdbc config file: public static Connection getConnection() throws SQLException { return JdbcUtil.getConnection( FacesContext.getCurrentInstance(), "nameOf.jdbc" ); } Or use createConnection and specify the path for the connection: public static Connection getConnection() throws SQLException { [read] Keywords: domino ibm database openntf
125


HTML5, script tags and partial refresh inside target area
Mon, Jan 27th 2014 3:22a   Tommy Valand
I had some issues with a script tag not loading inside a panel. The panel was set to only be visible when a view scope variable was set. It turns out that this is by design for HTML5. When script tags are inserted into a document using Ajax/innerHTML, the spec states that the script tag should not execute. HTML5 spec "...script elements inserted using innerHTML do not execute when they are inserted..." My workaround for this was to set full refresh for the event that refreshed the panel. [read] Keywords: ajax
139


Configuring input field for DateTime picker with localized date/time format
Tue, Oct 8th 2013 4:02a   Tommy Valand
In a new application a colleague of mine is working on, he wanted to let the user set date and time with Norwegian date and time format. One would think it should be pretty straightforward, but it took me around three hours to figure out how to do it. I accidentally discovered the way to do it while making a custom control with one field for date and one field for time. The custom control was meant to combine the two values into a date/time value. Luckily there's a simpler solution. Sourc [read] Keywords: domino application
103


Simple workaround for partial refresh issues with radio buttons
Mon, Sep 23rd 2013 4:02a   Tommy Valand
I had some issues getting partial refresh triggered by radio buttons to work as I wanted to across browsers. I found a simple workaround. Instead of specifying the partial refresh in the event handler, I set no submission for the server side part, and execute a slightly delayed XSP.partialRefreshPost from the client side event action: This seems to work nicely across the browsers I tested in, regardless of triggering the value change through the radio button or the label. [read] Keywords: server
103


Strange implementation of Document.setPreferJavaDates( true )
Thu, Sep 19th 2013 6:22a   Tommy Valand
I wanted to try the Document.setPreferJavaDates today and see how it worked. I called Document.setPreferJavaDates( true ); to ensure that no NotesDateTime objects were created as I didn't need them/didn't want to deal with recycling. First I tried: Document.getItemValueDateTimeArray( "fieldname" ); This returned a Vector of NotesDateTime. Then I tried: Document.getItemValue( "fieldname" ); This also returned a Vector of NotesDateTime. The way that finally returned a Vector [read] Keywords: domino java server
115


Workaround for issues with XPage in iframe on external website
Wed, Jul 3rd 2013 7:02a   Tommy Valand
A colleague of mine had some issues with an XPage running in an iframe on a customer's website. The customer notified us that some users with Chrome/Safari had issues with the page going blank. When doing partial refresh, the page went into a reload loop. I did a quick check, and couldn't find anything wrong with the code. I believe it has something to do with cross domain cookies and Webkit. My workaround was to have a script block that adds the SessionID parameter that was previously a [read] Keywords: xpages javascript




77


Benchmark: Fetching NoteIDs and documents from view
Thu, Jun 27th 2013 5:03p   Tommy Valand
In relation to an experiment I'm working on, I wrote a Java test agent to find the fastest way to get note id's from a view/fetching document values from documents in a view. Here are the results from the benchmark: All numbers are milliseconds. The code was run on a desktop computer (Core 2 Duo/Windows XP). The benchmark code is written so that I think caching on the server is avoided between tests. What's interesting from the results is that it seems like it's marginally faste [read] Keywords: agent application desktop java server
70


Custom Control for custom layout of checkboxes
Tue, May 21st 2013 4:09a   Tommy Valand
In a recent project, I wanted to create an interface to toggle different settings for different user types in an app. To save real estate on the page and (hopefully) make it more intuitive, I wanted to have a column per user type, and organize the checkboxes vertically. I couldn't find any way to do this out of the box. To make it work, I made a regular checkbox group per field. Then in a repeat control, I have regular HTML checkboxes with name fetched from the real checkbox group. The checkb [read] Keywords: firefox interface javascript properties
140


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
58


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




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