Package org.zkoss.zk.ui.util

Examples of org.zkoss.zk.ui.util.Configuration


public class SecurityWebAppInit implements org.zkoss.zk.ui.util.WebAppInit {
  private static String RESOLVER_CLASS = org.zkoss.spring.DelegatingVariableResolver.RESOLVER_CLASS;
  private static String SECURITY_RESOLVER = "org.zkoss.spring.init.SecurityVariableResolver";
  @SuppressWarnings("deprecation")
  public void init(WebApp wapp) throws Exception {
    final Configuration conf = wapp.getConfiguration();
   
    final ConfigurableApplicationContext ctx = (ConfigurableApplicationContext)
      WebApplicationContextUtils.getRequiredWebApplicationContext((ServletContext)wapp.getNativeContext());
   
    //add listener for ZK + Security
    if (ctx.containsBeanDefinition(ZkBeanIds.ZK_DESKTOP_REUSE_FILTER)) {
      conf.addListener(ZkSecurityContextListener.class);
      conf.addListener(ZkExceptionTranslationListener.class);
      conf.addListener(ZkEventProcessListener.class);
    }
   
    String classes = Library.getProperty(RESOLVER_CLASS);
    if (classes == null) {
      Library.setProperty(RESOLVER_CLASS, SECURITY_RESOLVER);
View Full Code Here

TOP

Related Classes of org.zkoss.zk.ui.util.Configuration

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.