Tuesday, July 12, 2005

After a bit of effort I now have some basic JSF pages working.

One error that stumped me for a good while was the following

Can't instantiate class ....

This came about from a backing bean I was tryign to configure from my face-config.xml

<managed-bean-name> Menubar </managed-bean-name>
<managed-bean-class> com.aol.beans.jsf.Menubar </managed-bean-class>
<managed-bean-scope> application </managed-bean-scope>
<description>List of items to appear in the MenuBar and privilages, these get localised to menu.</description>

Basically I was trying to set the itemsAndPrivilegeLevel parameter in the bean.

The problem was I hadn't created a getItemsAndPrivilegeLevel method in the bean. I dodn't think I needed one (I don't), but apparently either JSF or the beans specification think different, so I have to have that method there.

No comments: