" StateChange event.");
FacesContext context = FacesContext.getCurrentInstance();
String className = (String) type.getValue(context.getELContext());
try {
StateChangeListener listener = (StateChangeListener) Class.forName(className).newInstance();
if (component instanceof FoldingPanel)
((FoldingPanel) component).addStateChangeListener(listener);
} catch (InstantiationException e) {
throw new RuntimeException(e);
} catch (IllegalAccessException e) {