Package nsf.playground.environments

Source Code of nsf.playground.environments.EnvironmentFactory

package nsf.playground.environments;

import java.io.IOException;

import javax.faces.context.FacesContext;

import nsf.playground.beans.DataAccessBean;

import com.ibm.sbt.jslibrary.SBTEnvironment;
import com.ibm.sbt.jslibrary.SBTEnvironmentFactory;
import com.ibm.xsp.util.ManagedBeanUtil;

public class EnvironmentFactory extends SBTEnvironmentFactory {

  public EnvironmentFactory() {
  }
 
  public SBTEnvironment getEnvironment(String name) {
    try {
      DataAccessBean acc = (DataAccessBean) ManagedBeanUtil.getBean(FacesContext.getCurrentInstance(), DataAccessBean.BEAN_NAME);
      return acc.getEnvironment(name);
    } catch(IOException ex) {}
    return null;
  }
}
TOP

Related Classes of nsf.playground.environments.EnvironmentFactory

TOP
Copyright © 2018 www.massapi.com. 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.