JSF 2.0 namespaces

Here’s the namespace declarations for the JSF 2.0 tags:

<!DOCTYPE HTML>
<h:html lang="en" xmlns="http://www.w3.org/1999/xhtml"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:ui="http://java.sun.com/jsf/facelets">

For JSF 2.2 the URLs have changed. See post here.

Windows 8 hints and tips

There’s some seemly odd design choices in the way some things are implemented in Windows 8, like how to get to the Shutdown option, but maybe compared to Clicking on ‘Start’ to get to ‘Shutdown’ in hindsight really doesn’t make much sense either… it’s just that we’ve lived with it for so long now we’re just got used to it.

Here’s a few tips for Windows 8:

  • To get to Shutdown: move mouse to bottom right to get to Charms menu on right hand side. Click the Settings icon/charm, click on Power, then select Shutdown from the menu.
  • To toggle between start menu and desktop, move mouse to bottom left and click on the Windows icon. You can also toggle with the Windows key on the keyboard. If you have an app open in the Start screen though the Windows key seems to toggle between the open app and the desktop, and not the Start screen. Windows key and D also jumps straight to the desktop
  • As as shortcut, if you click on the desktop and press Alt F4, this will show a menu with shutdown options.
  • To create a shortcut on your desktop from an item in the Start screen All Programs list, right-click to select it, press the ‘Open file location’. This opens a Windows Explorer open in the directory containing the file. Right-click it, select ‘Sent To’ and ‘Desktop (create shortcut)’

 

Scala IDE: Scala Library error on a new project

Created my first project in Scala IDE and got this error on my project:

"Unable to find a scala library. Please add the scala container
or a scala library jar to the build path."

It seems that the project build path is missing the Scala system library. To fix:

– right-click project, click Properties

– click Java Build Path, then Libraries tab

– press Add Library button, select ‘Scala Library’ and then ok.

Done!

Scala notes: basic functions

A few notes for myself so I don’t forget:

A function like:

f(x) = x * x

is declared in Scala like:

def square(x : Int) = x * x

… which is a function called square, which takes a value x which is of type Int, and calculates the square of x.