// If its a Canvas then param[1] will be the page title,
// param[2] the theme file name
// param[3] the layout file name and
// param[4] the type.
if (attributes instanceof CanvasAttributes && params.length >= 5) {
CanvasAttributes ca = (CanvasAttributes)attributes;
ca.setPageTitle(params[1]);
ca.setTheme(params[2]);
ca.setLayoutName(params[3]);
if (params[4] != null) {
ca.setType(params[4]);
}
}
// If we are opening a Region param[1] will be the name
if (attributes instanceof RegionAttributes && params.length >= 2) {