import org.apache.commons.logging.LogFactory;
import org.argeo.cms.CmsConstants;
import org.argeo.cms.CmsException;
-import org.argeo.cms.CmsSession;
import org.argeo.cms.CmsUiProvider;
import org.argeo.cms.LifeCycleUiProvider;
import org.argeo.jcr.JcrUtils;
public void configure(Application application) {
try {
application.setOperationMode(OperationMode.SWT_COMPATIBILITY);
+ // application.setOperationMode(OperationMode.JEE_COMPATIBILITY);
+
application.setExceptionHandler(new CmsExceptionHandler());
// loading animated gif
}
// page title
- if (!properties.containsKey(WebClient.PAGE_TITLE))
- properties.put(
- WebClient.PAGE_TITLE,
- Character.toUpperCase(page.charAt(0))
- + page.substring(1));
+ if (!properties.containsKey(WebClient.PAGE_TITLE)) {
+ if (page.length() > 0)
+ properties.put(
+ WebClient.PAGE_TITLE,
+ Character.toUpperCase(page.charAt(0))
+ + page.substring(1));
+ }
// default body HTML
if (!properties.containsKey(WebClient.BODY_HTML))
@Override
public void handleException(Throwable throwable) {
- CmsSession.current.get().exception(throwable);
+ CmsUtils.getCmsView().exception(throwable);
}
}
// entryPoint.setState("");
entryPoint.setHeader(header);
entryPoint.setHeaderHeight(headerHeight);
- CmsSession.current.set(entryPoint);
+ // CmsSession.current.set(entryPoint);
return entryPoint;
}