<?xml version="1.0" encoding="UTF-8"?>
<!--Generated by Squarespace Site Server v5.11.5 (http://www.squarespace.com/) on Thu, 02 Sep 2010 20:42:32 GMT--><feed xmlns="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/"><title>mattwhite.me - Blog</title><subtitle>mattwhite.me Blog</subtitle><id>http://mattwhite.me/blog/</id><link rel="alternate" type="application/xhtml+xml" href="http://mattwhite.me/blog/"/><link rel="self" type="application/atom+xml" href="http://mattwhite.me/blog/atom.xml"/><updated>2010-09-02T08:32:12Z</updated><generator uri="http://www.squarespace.com/" version="Squarespace Site Server v5.11.5 (http://www.squarespace.com/)">Squarespace</generator><entry><title>A small tip for upgrading your XPages apps from 8.5.1 to 8.5.2</title><category term="8.5.2"/><category term="bugs"/><category term="ssjs"/><category term="tips"/><id>http://mattwhite.me/blog/2010/9/2/a-small-tip-for-upgrading-your-xpages-apps-from-851-to-852.html</id><link rel="alternate" type="text/html" href="http://mattwhite.me/blog/2010/9/2/a-small-tip-for-upgrading-your-xpages-apps-from-851-to-852.html"/><author><name>Matt White</name></author><published>2010-09-02T08:23:57Z</published><updated>2010-09-02T08:23:57Z</updated><content type="html" xml:lang="en-GB"><![CDATA[<p>If you have been using Stephan Wissel's "<a href="http://www.wissel.net/blog/d6plinks/SHWL-7MGFBN">Web Agents, XPages Style</a>" technique for outputting non-HTML content from your XPages, you may run into a problem when you upgrade your server to 8.5.2.</p>
<p>In the original afterRenderResponse sample code, you would use something like...</p>
<pre style="font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; color: #000000; background-color: #eee; font-size: 12px; border: 1px dashed #999999; line-height: 14px; padding: 5px; overflow: auto; width: 100%;"><code>try{
    var exCon = facesContext.getExternalContext(); 
    var writer = facesContext.getResponseWriter();
    var response = exCon.getResponse();
    response.setContentType("text/plain");
    writer.write("Hello World");
    writer.close();
}catch(e){
    _dump(e);
}
</code></pre>
<p>What you may find is running that code on your lovely new 8.5.2 server will result in an Error 500 with no detail of the error itself. To fix the problem, simple remove the</p>
<pre style="font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; color: #000000; background-color: #eee; font-size: 12px; border: 1px dashed #999999; line-height: 14px; padding: 5px; overflow: auto; width: 100%;"><code>writer.close();
</code></pre>
<p>line from the source code and you should be good to go.</p>]]></content></entry><entry><title>What's new with XPages in 8.5.2</title><category term="8.5.2"/><category term="XPages"/><category term="xpages101"/><id>http://mattwhite.me/blog/2010/8/25/whats-new-with-xpages-in-852.html</id><link rel="alternate" type="text/html" href="http://mattwhite.me/blog/2010/8/25/whats-new-with-xpages-in-852.html"/><author><name>Matt White</name></author><published>2010-08-25T11:19:50Z</published><updated>2010-08-25T11:19:50Z</updated><content type="html" xml:lang="en-GB"><![CDATA[<p>Over on <a href="http://xpages101.net">XPages101.net</a> I've just posted (yet another) video. This time we're looking at what's new in 8.5.2 for the XPages developer.</p>
<p><script type="text/javascript" src="http://mediaplayer.yahoo.com/js"></script> <a href="http://mattwhite.me/storage/WhatsNewIn852.mp3">What's New With XPages in 8.5.2</a></p>
<p>As a bit of a teaser, I thought I'd post the audio from that recording here as well so that you can hear what you're missing. As ever, feel free to subscribe if you want to get a jumpstart on your XPages development. There are 30 different videos up on the site covering all the elements you'll need to get started and then dig a little deeper into XPages development. The <a href="http://xpages101.net/videos/">full video listing can be found here</a>.</p>]]></content></entry><entry><title>Heading home</title><category term="My Life"/><category term="iamlug"/><category term="tackiton"/><category term="travel"/><category term="xpages101"/><id>http://mattwhite.me/blog/2010/8/6/heading-home.html</id><link rel="alternate" type="text/html" href="http://mattwhite.me/blog/2010/8/6/heading-home.html"/><author><name>Matt White</name></author><published>2010-08-05T23:53:24Z</published><updated>2010-08-05T23:53:24Z</updated><content type="html" xml:lang="en-GB"><![CDATA[<p>It seems like a long time since I went away on holiday, and it is. Since the middle of July I've been to <a href="http://www.latitudefestival.co.uk/">Latitude</a> (great), Madeira (great), <a href="http://iamlug.org/iamlug/IamLug2010.nsf">IamLUG</a> (great) and run an <a href="http://xpages101.net">XPages101</a> day (seemed to go well). So all in all it's been a really enjoyable few weeks.</p>
<p>I'm sat in JFK airport in New York waiting to start the final leg of the journey home and much as it's been a great couple of weeks away, I am *really* looking forward to getting back home and just decompressing for a couple of days before getting back into the real world with a vengeance on Monday morning.</p>
<p>IamLUG was a really superb event, <a href="http://idonotes.com">Chris</a> and the rest of the team do put on a good show. Everything was run incredibly smoothly, the content was very good indeed and, as ever, the people were great company. I presented my "<a href="http://mattwhite.me/iamlug_tenpatterns.zip">Ten XPages Design Patterns</a>" session, probably for the last time as I've used it for a year now. So I need to start thinking about future sessions pretty seriously now. (Bet you can't guess what I plan to speak about next time!).</p>
<p>After IamLUG, we had the inaugural "<a href="http://tackiton.com">Tack It On</a>" day, and I'd really like to thank <a href="http://www.lotusnotebook.com/">David Leedy</a> for his invaluable assistance during the day. I had been rather lax and not given him a huge amount of guidance before the day itself but he dealt with all of the questions with good grace and humour. Things really wouldn't have run as smoothly without him there. Overall I think the day went pretty well. I'm sure there'll be more of these sorts of things happening in the future.</p>]]></content></entry><entry><title>Gone fishing</title><category term="My Life"/><category term="iamlug"/><category term="life"/><category term="travel"/><id>http://mattwhite.me/blog/2010/7/15/gone-fishing.html</id><link rel="alternate" type="text/html" href="http://mattwhite.me/blog/2010/7/15/gone-fishing.html"/><author><name>Matt White</name></author><published>2010-07-15T16:00:30Z</published><updated>2010-07-15T16:00:30Z</updated><content type="html" xml:lang="en-GB"><![CDATA[<p>Well it doesn't happen very often (it's over two years since I last took a proper holiday), but I'm off on holidays for the next two weeks. This weekend we're heading up to Suffolk to the <a href="http://www.latitudefestival.co.uk/home/">Latitude Festival</a> and then later next week it's off to <a href="http://www.madeira-web.com/">Madeira</a> for a family trip where we'll be celebrating important birthdays for my parents amongst other things.</p>
<p>When I get back from holidays I literally switch airports and fly straight off to St Louis for the <a href="http://iamlug.org/">IamLUG</a> conference. (If you've not <a href="http://iamlug.org/">registered for it</a> and the <a href="http://tackiton.com/">Tack It On</a> day which follows then what have you been doing?)</p>
<p>So all in all it's going to be a fun few weeks. But if I don't respond to your email you'll know why.</p>]]></content></entry><entry><title>Forcing a file name when downloading a dynamically generated csv file</title><category term="Show-n-Tell Thursday"/><category term="excel"/><category term="http"/><category term="ssjs"/><category term="xpages"/><id>http://mattwhite.me/blog/2010/7/14/forcing-a-file-name-when-downloading-a-dynamically-generated.html</id><link rel="alternate" type="text/html" href="http://mattwhite.me/blog/2010/7/14/forcing-a-file-name-when-downloading-a-dynamically-generated.html"/><author><name>Matt White</name></author><published>2010-07-14T14:47:41Z</published><updated>2010-07-14T14:47:41Z</updated><content type="html" xml:lang="en-GB"><![CDATA[<p>Over the last couple of weeks I've been working on a customisation project using IQJam as a starting point and then making it better fit a particular customer's requirements. It's worth mentioning as I finally had the justification to spend a little time investigating a problem which has been bugging me.</p>
<p>One of the features I added to IQJam was the ability to export data to Excel, a common enough feature that you've been able to do in Domino for ever. Simply print data out to the browser in simple HTML format and change the content-type of the page to "application/vnd.ms-excel". That's not the point of this posting really.</p>
<p>The problem I've been trying to work around is that if your user is using Excel 2007 or later (I'm only on the beta of Office 2010 but it still seems to be a problem for me anyway) and you use the printing HTML technique, Excel raises an error for the user when they load the page, something like:</p>
<blockquote>The file you are trying to open, 'name.ext', is in a different format than specified by the file extension. Verify that the file is not corrupted and is from a trusted source before opening the file. Do you want to open the file now?</blockquote>
<p>According to various <a href="http://support.microsoft.com/kb/948615">technotes</a> and <a href="http://blogs.msdn.com/b/vsofficedeveloper/archive/2008/03/11/excel-2007-extension-warning.aspx">blog posts</a> there is no work around for this, it is a deliberate security feature of Excel. Fair enough I can live with this, though it's not acceptable to the end user, so instead of generating an Excel file I reverted to generated CSV formatted data.</p>
<p>The thing I learned from my investigations into the Excel problem was that there is this header which you can add to the data being generated which tells the browser that the page being opened is actually a file attachment and what the name of the file you want to download should be. So in my example, I'm able to create a unique file name every time the page is generated and also specify that it should be saved as a CSV file, not .XSP which is what it would be thanks to the page being loaded being an XPage. See this example:</p>
<blockquote>try{<br /> &nbsp;&nbsp;&nbsp;&nbsp;var exCon = facesContext.getExternalContext(); <br /> &nbsp;&nbsp;&nbsp;&nbsp;var writer = facesContext.getResponseWriter();<br /> &nbsp;&nbsp;&nbsp;&nbsp;var response = exCon.getResponse();<br /> &nbsp;&nbsp;&nbsp;&nbsp;response.setContentType("text/csv");<br /> &nbsp;&nbsp;&nbsp;&nbsp;response.setHeader("Content-disposition", "attachment; filename=export_" + DateConverter.dateToString(@Now(), "yyyyMMddhhmm") + ".csv");<br /> &nbsp;&nbsp;&nbsp;&nbsp;response.setHeader("Cache-Control", "no-cache");<br /> &nbsp;&nbsp;&nbsp;&nbsp;writer.write(getCSVBody());<br /> &nbsp;&nbsp;&nbsp;&nbsp;writer.endDocument();<br /> &nbsp;&nbsp;&nbsp;&nbsp;facesContext.responseComplete();<br /> &nbsp;&nbsp;&nbsp;&nbsp;writer.close();<br /> }catch(e){<br /> &nbsp;&nbsp;&nbsp;&nbsp;_dump(e);<br /> }</blockquote>
<p>So this server side javascript sits in the afterRenderResponse of my XPage and is using the "<a href="http://www.wissel.net/blog/d6plinks/SHWL-7MGFBN">web agents XPages style</a>" technique which Stephan first documented to generate non HTML content from an XPage. The key line for this blog post is where the "Content-disposition" header is set, hopefully you can see where the filename is being created (I'm also using <a href="http://dontpanic82.blogspot.com/2010/04/xpages-code-snippet-for-datestring.html">Tommy Valand's DateConverter SSJS code</a> to get the current date / time formatted into a nice string).</p>
<p>Anyway, not a new technique looking at the dates on some of the internet postings out there, but a new one on me and worth passing on I thought.</p>]]></content></entry><entry><title>Ten days into the iPad</title><category term="Apple"/><category term="ipad"/><id>http://mattwhite.me/blog/2010/6/11/ten-days-into-the-ipad.html</id><link rel="alternate" type="text/html" href="http://mattwhite.me/blog/2010/6/11/ten-days-into-the-ipad.html"/><author><name>Matt White</name></author><published>2010-06-11T07:36:55Z</published><updated>2010-06-11T07:36:55Z</updated><content type="html" xml:lang="en-GB"><![CDATA[<p>Of course it's shiny and built by Apple so there was no question that I'd end up buying one. The big question was whether to go for the Wifi or 3G version. In the end, the lack of availability of the 3G informed the decision somewhat, so I ended up with a <a href="http://www.apple.com/uk/ipad/">64gb Wifi model</a>. The reason I was so undecided is that since I have <a href="http://gizmodo.com/5543853/what-is-froyo">Froyo</a> installed on my <a href="http://www.google.com/phone">Nexus One</a> phone, it's so easy to make that a Wifi hotspot that I was finding it hard to justify getting yet another sim card and the associated costs that go with it.</p>
<p>So ten days into owning the device and I'm really liking it. Not to say it's perfect in any way, the things that I am hanging out for when <a href="http://www.apple.com/uk/iphone/softwareupdate/">iOS4</a> is released (in the Autumn for the iPad as far as I can tell) are the pseudo multi tasking and a better notification system. Having been an Android user for a few months now, there's certainly no way I could leave that as my primary mobile device, the multi tasking, notifications and general geekiness of that phone really make it a wonderful handset for me.</p>
<p>The main point of this post was to mention that I had also purchased an <a href="http://www.goincase.com/products/detail/cl57512R">InCase iPad case</a> at the same time as the iPad. For the first couple of days it was superb, felt high quality and worked really well. Unfortunately within 4 days the case no longer worked properly as, in landscape mode (which is how I seem to operate mainly) the iPad would slide out of the case so that the bottom half inch of the screen wasn't visible. Not very good. So yesterday I took it back to the Apple store and got a refund.</p>
<p>This is the first time I've ever tried to get a refund for anything from Apple and it wasn't an easy process. Initially the guy I was dealing with wouldn't offer me a refund as I didn't have the original packaging. My protestations that they had sold me faulty goods were falling on deaf ears. In the end the only reason I got the right to swap the case for other goods to the same value was because, as ever, the store was packed and after five minutes of arguing I had a little bit of an audience, all of whom were on my side and telling the guy he should give me a refund. So the lesson is make sure you go in to the store when it's busy and then stick to your guns!</p>
<p>I ended up with the <a href="http://store.apple.com/uk/product/MC361ZM/A?fnode=MTc0MjU2Mjc&amp;mco=MTc0Njk4ODM">Apple own brand</a> case as a replacement and it seems to work a lot better, even if it does look and feel quite cheap and plastic-y. We'll see how long it lasts.</p>]]></content></entry><entry><title>My IamLUG Session</title><category term="Domino Community"/><category term="iamlug"/><category term="xpages101"/><id>http://mattwhite.me/blog/2010/6/8/my-iamlug-session.html</id><link rel="alternate" type="text/html" href="http://mattwhite.me/blog/2010/6/8/my-iamlug-session.html"/><author><name>Matt White</name></author><published>2010-06-08T07:07:46Z</published><updated>2010-06-08T07:07:46Z</updated><content type="html" xml:lang="en-GB"><![CDATA[<p>Yesterday <a href="http://iamlug.org/IamLUG/blog.nsf/dx/the-first-round-of-sessions-for-iamlug-2010-announced.htm">Chris Miller announced</a> the first batch of speakers and sessions for this year's IamLUG conference in St Louis. I'm fortunate enough to have had my abstract accepted. And so I'll be presenting an updated version of my "<a href="http://iamlug.org/iamlug/IamLug2010.nsf/session.xsp?action=openDocument&amp;documentId=78F96453D7A4615A8625770300322D5B">Ten XPages Design Patterns</a>" session.</p>
<p>There is already a great <a href="http://iamlug.org/iamlug/IamLug2010.nsf/sessions.xsp">list of speakers and sessions announced</a>, so if you've not registered yet then get over to the IamLUG site quickly to get signed up, it's a free conference remember!</p>
<p>And then, of course, there's the <a href="http://tackiton.com/IamLUG">Tack It On</a> extra day of deep dive content provided by Rob Novak and the SNAPPS team, Chris Miller and myself. All in all, three days of great sessions, interesting people, and I'm sure more than a little fun as well.</p>]]></content></entry><entry><title>Lotus UK Power of Business Applications</title><category term="Domino Community"/><category term="applications"/><category term="speaking"/><category term="xpages"/><id>http://mattwhite.me/blog/2010/5/18/lotus-uk-power-of-business-applications.html</id><link rel="alternate" type="text/html" href="http://mattwhite.me/blog/2010/5/18/lotus-uk-power-of-business-applications.html"/><author><name>Matt White</name></author><published>2010-05-18T15:43:44Z</published><updated>2010-05-18T15:43:44Z</updated><content type="html" xml:lang="en-GB"><![CDATA[<p>Darren Adams has already mentioned this day on 16th June, but I thought I'd just make sure that people know about it as well.</p>
<p>Basically what Darren has organised is a day all about Lotus application development in the real world. So I'm going to speak a little about the history of IdeaJam, where we are and hot we got here. Then in the afternoon I'm back on my favourite hobby horse; XPages development. This time the title for the session is "Rejuvenating&nbsp;Domino Web Applications with XPages".</p>
<p>There looks like there's some really great content during the day, so if you have anything to do with Domino applications (that's development, implementation, management, or anything else really, this isn't an overly techie day) then it will probably be worth you coming along.</p>
<p>And best of all, it's free. You just need to <a href="https://www-950.ibm.com/events/wwe/grp/grp006.nsf/v16_agenda?openform&amp;seminar=4EAFUNES&amp;locale=en_GB">register here</a>.</p>]]></content></entry><entry><title>XPages101 comes to America</title><category term="Domino Community"/><category term="training"/><category term="xpages101"/><id>http://mattwhite.me/blog/2010/5/4/xpages101-comes-to-america.html</id><link rel="alternate" type="text/html" href="http://mattwhite.me/blog/2010/5/4/xpages101-comes-to-america.html"/><author><name>Matt White</name></author><published>2010-05-04T14:29:52Z</published><updated>2010-05-04T14:29:52Z</updated><content type="html" xml:lang="en-GB"><![CDATA[<p>I've been working with <a href="http://idonotes.com">Chris Miller</a> and <a href="http://lotusrockstar.com">Rob Novak</a> over the last few weeks to put together a great extra day after <a href="http://iamlug.org">IamLUG</a> this August in St Louis.&nbsp;</p>
<p>Basically the plan is that I'll run my <a href="http://xpages101.net/classroom">XPages101 classroom course</a>, Chris will be running a new "Domino Optimization Tour" and Rob and the SNAPPS team will be running their iPhone Development class. Each of the courses will be running concurrently in the same rooms that IamLUG will have been in for the previous couple of days. And because we're able to get some economies of scale by operating together, the prices for the extra training day, or "<a href="http://tackiton.com/iamlug">Tack It On</a>" day can be kept as low as possible.</p>
<p>So if you're interested in learning XPages, iPhone development or taking a deep dive into Domino server optimisation then <a href="http://tackiton.com/iamlug">visit the information site for more details</a>.</p>]]></content></entry><entry><title>Pleasant 8.5.2 surprise... everything works!</title><category term="8.5.2"/><category term="Notes and Domino"/><id>http://mattwhite.me/blog/2010/4/27/pleasant-852-surprise-everything-works.html</id><link rel="alternate" type="text/html" href="http://mattwhite.me/blog/2010/4/27/pleasant-852-surprise-everything-works.html"/><author><name>Matt White</name></author><published>2010-04-27T11:00:03Z</published><updated>2010-04-27T11:00:03Z</updated><content type="html" xml:lang="en-GB"><![CDATA[<p>Well maybe that's too bold a claim, but from the point of view of regression testing IdeaJam and IQJam for XPages issues, a vanilla application works absolutely fine. And better than that, it seems to be faster as well.</p>
<p>Why is this even worth commenting on you ask? Well between 8.5.0 and 8.5.1 there were some quite significant changes in the way XPages worked which meant I had to do some re-coding of my XPages apps to get them to work properly when we migrated up to the new version. But, so far, and all of the usual caveats apply here* (see below for more information), I can simply copy an NSF from my 8.5.1 VM onto my 8.5.2 VM and it works.</p>
<p>We've not done any proper testing on the performance side of things, but from my usage of the application everything feels snappier.</p>
<p>So, who needs new features when we've got stability between versions. Well OK, I'll not turn down the spangly new development features (dragging controls into the source XML of an XPage is far and away my favourite), but even without them, I'm a happy camper this morning.</p>
<p>*** 8.5.2 is still in beta things may change between now and when it's released. Let's hope not eh?</p>]]></content></entry></feed>