Tuesday, 29 January 2008

Leaked UK National ID Register Document

In response to a post on boingboing requesting mirrors for a leaked document, here is my mirror copy. Enjoy :)

Labels: , ,

Saturday, 26 January 2008

Spring MVC Wizards & Form Taglib

I've been building a JSP based website for a course module titled "Technologies for Electronic Commerce". It's finished now, but I've only just got round to writing up this post.

As part of this I was trying to make a multi-page form, using Spring's AbstractWizardFormController and spent an hour or so trying to make the form submission change the form page. My problem was that it wasn't immediately obvious how to use the form taglib with the Wizard architecture.

The docs mentioned using request parameters, which was a bit confusing as I was using a POST form submission, however all you actually need to do is add one of these parameters to the form data (usually using a button).

Finish and cancel actions can be triggered by request parameters, named PARAM_FINISH ("_finish") and PARAM_CANCEL ("_cancel"), ignoring parameter values to allow for HTML buttons. The target page for page changes can be specified by PARAM_TARGET, appending the page number to the parameter name (e.g. "_target1"). The action parameters are recognized when triggered by image buttons too (via "_finish.x", "_abort.x", or "_target1.x").

For example:

<input value="Submit" name="_target1" type="submit"/>
This will request to change to page 2 of the form (remember Array base is 0). Because of the way forms work, you can have a number of these (either as clickable images or buttons) and only the one the user eventually selects will be submitted with the request.

Labels: , , , ,

Saturday, 5 January 2008

Making the most of Pandora.com

Pandora.com is pretty cool, it's been around for a while now but I just went back to it for some easy listening background music to work to. Supposedly they've begun to use IP filtering to limit the audience to the US. Either this is no longer in place or they've made a mistake in a regex somewhere, as this is definitely not the US. I'd forgotten about the limit to the unpaid service, which stops playback after so many songs, but it was quite a while before I actually encountered it. This may be a Mac OS X bug in the flash implementation, but it seems that if you keep the Firefox window containing the player minimised in the Dock, the music doesn't stop playing! Of course this does get in the way of the whole feedback system slightly, but I'm sure there are those who won't mind too much. Once I did encounter the limit I couldn't just refresh the page and go back to listening again as they're smart enough to stop you doing that. But not that smart. To completely stop this you would require either some heinous DRM-spawn system describable as cookies which you can't delete, or some kind of unique client ID, effectively voiding all browser privacy. So to be fair, from the technologies they had to work with, they've done the best they could. ;) So once you've been shut out of the Pandora player try the following:
  1. Delete your cookies from their domains.
  2. Delete any data stored within Adobe Flash for their domain.
The latter can be achieved by opening the Adobe Flash client settings and changing the data limit for the domain to 0KB, which will take effect upon refreshing the page, upon which the flash applet will request to store data in your browser again, and you're back listening, but without any of your stations.

Update:

It appears that the region filtering will go live on January 15th, not quite yet.

Labels: , , , ,