357 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 209
HTML5, script tags and partial refresh inside target area
Mon, Jan 27th 2014 236
Configuring input field for DateTime picker with localized date/time format
Tue, Oct 8th 2013 308
Simple workaround for partial refresh issues with radio buttons
Mon, Sep 23rd 2013 205
Strange implementation of Document.setPreferJavaDates( true )
Thu, Sep 19th 2013 190
Workaround for issues with XPage in iframe on external website
Wed, Jul 3rd 2013 242
Benchmark: Fetching NoteIDs and documents from view
Thu, Jun 27th 2013 148
Top 10
Configuring input field for DateTime picker with localized date/time format
Tue, Oct 8th 2013 308
Fix for partial refresh on Dojo Tab Container/Content Pane
Wed, Mar 20th 2013 252
Workaround for issues with XPage in iframe on external website
Wed, Jul 3rd 2013 242
HTML5, script tags and partial refresh inside target area
Mon, Jan 27th 2014 236
Multi value fields and Beans in XPages
Mon, Jun 25th 2012 228
Snippet to clear session for user
Thu, Sep 6th 2012 217
Dynamically pointing DomSQL to current database
Tue, Jan 28th 2014 209
Simple workaround for partial refresh issues with radio buttons
Mon, Sep 23rd 2013 205
Simple trick to format XPages Checkbox group
Thu, Apr 14th 2011 199
Strange implementation of Document.setPreferJavaDates( true )
Thu, Sep 19th 2013 190


Runtime optimized JavaScript and CSS - workaround for multiple stylesheets
   

If you have multiple local stylesheets on a page, the CSS files are combined into a single file.

This changes the url to the stylesheet (adds xsp/.ibmmodres/.css after the path to the db).

If you have an image reference like url(image.png), the image can no longer be loaded, as the url is relative to the path of the stylesheet.

To work around this issue, add ../../../ to the image reference.

E.g.
url(../../../image.png)


---------------------
http://feedproxy.google.com/~r/dontpanic82/~3/0AbpMH-CjfY/runtime-optimized-javascript-and-css.html
Jan 26, 2012
67 hits



Recent Blog Posts
209


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
236


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
308


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
205


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
190


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
242


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




148


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
153


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
252


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
108


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