Digging into Dojo and Selecting Dom Nodes
<ul id="movies"> <li class="sortme"> <div class="movie"> Gross Point Blank </div> </li> <li class="sortme"> <div class="movie"> Casino Royale </div> </li> </ul>
Then I could use the following line to select all of the divs that have the CSS class “movie” applied to them:
var list = $('movies').getElements('div.movie');
But how do you do the same in Dojo? Well of course it’s simple, just need some different syntax. So for the same HTML as before, we would use dojo.query tool like this:
For more detail, check out the Book of Dojo chapter on selecting dom nodes with dojo.query
Ytria tools just saved me half a day
I mentioned yesterday that we are planning to release the UKLUG Site Template onto OpenNTF later on in the year, having been through the process of “shrink wrapping” a database with IdeaJam I was dreading the process of just adding some consistency to the look and feel of the Notes side of things. It’s the silly little things like consistent fonts, colours and layout that take ages and ages. Enter the Ytria tools called ViewEZ and ActionBarEZ, in 10 minutes I was able to apply a consistent look and feel to the entire database and I’m free then to spend the rest of my Saturday afternoon on more interesting things instead.
So thanks to the Ytria guys for making my weekend better. If you’re a Notes developer and you haven’t tried them out then you really do owe it to yourself to have a look.
IamLUG Registration Open
Chris Miller has announced that registration is open for the inaugral IamLUG meetup in St Louis in August.
It sounds like it’s going to be a great event, and I’m going to try my best to get over to it (a good excuse for a bit of a holiday tacked onto the end).
You may also have noticed that the IamLUG site looks strangely similar to the UKLUG one! Well Chris has gamely decided to start using our very much “in development” template. It’s not properly documented yet and there are a lot of rough edges that I am still sorting out, but once we get closer to the events, we’ll definitely be releasing the template to OpenNTF to add to the ever increasing number of XPages apps out there for you to rip apart.
Anyway, if you’ve always wanted to attend ILUG or UKLUG and couldn’t justify the flight to Europe, then I suspect that IamLUG will be in much the same vein, great speakers, sponsors, good craic and good people. Hopefully see you there.
XPages: Displaying a view inside a Dojo Dialog
This is my first SnTT post for absolutely ages, but, hopefully I’ll be able to do quite a few more over the next few months as I am just starting a brand new XPages project for a customer that runs through until August.
One of the first things I have been bashing my head against the development wall over is how to get a view to act as a picklist in a dialog. In theory, it should be pretty easy, you just add the “dijit.Dialog” to your XPage resources like so:
Don’t forget to also enable the dojoParseOnLoad and dojoTheme properties at the same time.Then inside your XPage you’ll want to actually create the dialog HTML:
At this point I had assumed that I could just add my view control inside the div and Bob, as they say, would be my mother’s brother. But I hadn’t catered for Dojo taking control of the HTML in the XPage once it was rendered. Basically what happens is that after the page loads, Dojo moves the div I created out of the Domino generated form and makes it a child of the body element. This displays fine, until you try and navigate through the view using the pager control, which no longer works as the javascipt requires the HTML to beinside the Domino form. So as far I can tell you have a couple of options, either move the div back inside the form, but I’m assuming that Dojo moved it out for a reason so I wanted to avoid that.
Last Minute LotusBeer
Mr Buchan and a few others will be meeting for a beer or two, tomorrow evening at the Founders Arms near the Tate Modern gallery on the South Bank of the Thames to make the most of the beautiful weather and the fact that it’s Thursday evening. If you can make it at such short notice, you are more than welcome to come along. We’ll be there some time after 5pm, and will probably stay for a while!
Developer 2009 is over
Well my first visit to Developer2009 is over, most people are already headed to the airport and there’s a little time to chill out before my flight home tomorrow.
It’s been a great week of catching up with old friends and meeting some new ones. This conference is very different from Lotusphere, the sessions, with the extra 30 minutes allow the presenters to get a lot more geeky and cover a lot of ground, I really enjoyed the ones that I was involved with. And, after such an incredibly busy week in January, I actually managed to get to see some of the best speakers in the business, who I had missed in Florida.
The nature of these events mean you’re constantly moving around between rooms, but I realised last night as we popped out to a bar on Boylston Street that I hadn’t actually been outside since Monday, not good, but it does give an impression of how busy you get, just chatting with people and finding out what other companies are doing.
On the XPages front, people seemed very interested and keen as ever with the new technology, hopefully we’ll see over the next year or so more people using it in a production environment as 8.5 is rolled out. From my point of view, I land on Sunday morning and then head straight off on Monday to start a new XPages project which will keep me busy for the next few months. Good times all round really.
Now I think it’s time to head off for a beer and some dinner.
Liveblog of The View 2009 OGS
Paul and I have set up a Cover It Live live blog for the OGS of The View 2009 conference. Bob Picciano will be keynoting so hopefully we’ll get some good content. Paul will cover admin and I’ll cover the more interesting dev stuff 🙂 so come here or to Pauls blog from around 08.30 EDT tomorrow:
In Boston for Developer2009
I flew over to Boston today a couple of days early for the Developer2009 conference that I will be attending. Possibly the quietest flight I’ve ever been on, with plenty of space to spread out in and generally easy transfers meant I got from door to door in just over 12 hours, not bad at all.
If you’re attending the View conferences this week, and you see me wandering around (that’s me to the right –>) then please do say Hi, the best part of these Lotus community conferences is meeting new people. I’ll be presenting as well this year with sessions on Domino web development, XPages, a BOF on XPages with Pete Janzen and various other bits and pieces. It should be a good week.
It’s that time of year when lots of people start to do outdoors-ie things to raise money for charidee.
If you’re looking for decent causes then you could do worse than either Eileen’s Great Wall of China walk or Kitty and Warren’s marathon walk.
Warren, Kitty and Eileen all do a huge amount for the Lotus community, and their charities really need the money so see if you can spare a little change at Easter for them.