Sunday, July 31, 2005

Holiday in Cornwall - day 1

Well here we are on holiday in Cornwall. The journey down was a complete nightmare, what with the atrocious British weather and some bus drivers inability to stop his bus from bursting into flames. It all helped turn an already daunting 5 hour journey into a delightful 8. Thank god for sat nav, or I would never have found this place!
We are staying in a holiday cottage in North Tamerton, which is lovely. However, <bile blog mode>If you're charging 900 beer tokens a week for a cottage then at least:
1. Air the place - it stank like it hasn't been lived in since last year.
2. Mow the grass - how are we supposed to spot the dog shit in foot long grass?
3. Make sure the place is secure - sliding doors that cannot be locked are not secure!
4. If the nearest shop is 7 miles away then at least make some soap, washing up liquid and toilet paper available until we get chance to shop.
5. The place has 4 bedrooms (and there are currently 8 people here) so how come the fridge is only big enough for 2 people who don't intend to eat much? </bile blog mode>
On the upside, there may not be a shop on site but there is a pub! We'll be checking that out fairly soon :)
There's also loads of nature - we've spotted a deer, fox, numerous birds and a pig(!) all in the first morning.
But hey I'm on holiday so I'm going to try and put my Victor Meldew persona to one side and enjoy myself...

Thursday, July 21, 2005

Getting 'unchecked' value from Struts checkbox

The following was posted last year on a different blog. I'm consolidating posts here and you never know when this info may come in handy :)

Having just spent half the afternoon trying to get a page with a checkbox to work correctly with Struts I stumbled across the following. I knew that an unchecked value was never returned in the form and, as we are using Struts DynaActionForms, was starting to think about over-riding the Form when I came across a solution that is so simple it's embarrassing.

The solution is to add a hidden field immediately after the checkbox field i.e.

<html:checkbox property="currentLocation" value="true"/>
<html:hidden property="currentLocation" value="false"/>
When the form is submitted if the checkbox is selected the hidden field is ignored, but if the checkbox is empty it isn't in the form so the hidden field is used.
Works a treat.

Sunday, July 17, 2005

Someone Comes To Town, Someone Leaves Town

Cory Doctorow's new book 'Someone Comes To Town, Someone Leaves Town' is now available as a free download from his website http://www.craphound.com.

I converted it to Microsoft EReader (.lit) format and he has made it available on his page. However, a few people have complained that the file is corrupt and the font isn't great (it's horrible!) so I have re-done it using the Verdana font and corrected the text from his errata page.

I've emailed it to Cory so hopefully it will appear on his page soon, but in the mean time you can download it from here.