Tuesday, February 27, 2007
Firebug and Net View
Monday, January 29, 2007
Microsoft, Patnets and BlueJ (Java IDE)
Friday, January 12, 2007
ProxyUserDirectoryProvider
As part of the work I have been doing with Sakai and Bodington I needed to allow Sakai to access the user details that are stored in Bodington. The normal way to do this would be to write a UserDirectoryProvider (UDP) that sits in the components folder. The problem is that I didn't want to put the whole of Bodington into the components classloader and tomcat was going to load Bodington anyway as a webapp. The solution was to create a proxy that could be injected with the real Bodington UDP when Bodington started up. This needed to be an API that extended the standard UDP:
public interface ProxyUserDirectoryProvider extends UserDirectoryProvider {
UserDirectoryProvider getUdp();
void setUdp(UserDirectoryProvider udp);
}
This ProxyUserDirectoryProvider could then be requested from the component manager at Bodington startup and setUdp() called with the full implementation of the Bodington UDP. The proxy I created is currently sitting in https://svn.oucs.ox.ac.uk/projects/vle/sakai/user-proxy/trunk/.
Wednesday, December 13, 2006
element.getAttribute("class")
var element = document.getElementById("theSpan");
in a document containing the HTML:
<span id="theSpan" class="something">
| Browser | element. getAttribute( "class" ); | element. getAttribute( "CLASS" ); | element. getAttribute( "className" ); | element. attributes[ "class" ]; | element. className; |
|---|---|---|---|---|---|
| Firefox 2.0 | something | something | null | [object Attr] | something |
| Opera 9.0 | something | something | null | [object Attr] | something |
| Safari 1.3.2 | something | something | null | undefined | something |
| IE 5.5 (Mac) | null | null | something | something | something |
| IE 7.0 | null | null | something | [object] | something |
Updated: Thanks to anonymous for pointing out that you can just use element.className to get the class name used and it seems to work correctly across all browsers I tested.
It seems that there is no simple way to get the class attribute across browsers. The solution seems to be to get the class attribute and if it undefined try the className attribute. Most other attributes should work fine, it is just that IE doesn't like the class attribute that throws the spanner in the works. Here is the quick testing page.
Tuesday, December 12, 2006
Label Based Feeds
Tuesday, November 28, 2006
Marketing through last.fm
Friday, November 03, 2006
Sakai Site.equals()
org.sakaiproject.site.api.Site equals() method will return true when passed a string if it matches the ID of the site. The reason they do this is so that they can save a list of site IDs and then have a collection of sites and call
siteList.removeAll(stringList);. This can be seen is action in the CharonPortal where is is used to hide sites that the user isn't interested in.