📄 basebean.java
字号:
/*
* JCatalog Project
*/
package catalog.view.bean;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
//
import catalog.view.servicelocator.ServiceLocator;
/**
* @author <a href="mailto:derek_shen@hotmail.com">Derek Y. Shen</a>
*/
public class BaseBean {
//the logger for this class
protected final Log logger = LogFactory.getLog(this.getClass());
//the service locator of the business services
protected ServiceLocator serviceLocator;
public BaseBean() {
}
public ServiceLocator getServiceLocator() {
return this.serviceLocator;
}
public void setServiceLocator(ServiceLocator newServiceLocator) {
this.logger.debug("service locator is set");
this.serviceLocator = newServiceLocator;
this.init();
}
/**
* Used to initialize the managed bean.
* <p>
* Called after the service locator is set.
* It is a workaround.
* <p>
* Once the JSF bean management facility can support init method,
* the init method can be configured and called from the JSF implementation directly.
*/
protected void init() {
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -