netbarbean.java
来自「一个jsf企业级程序示例实现一些基本功能」· Java 代码 · 共 36 行
JAVA
36 行
package com.wxd.netbar.presentation;
import javax.faces.application.Application;
import javax.faces.context.FacesContext;
import javax.servlet.ServletContext;
import org.springframework.web.context.WebApplicationContext;
import com.wxd.netbar.domain.NetBar;
import com.wxd.netbar.persistence.dao.NetBarDaoImpl;
import com.wxd.netbar.service.PlatformMgServiceImpl;
import com.wxd.netbar.util.SpringWebUtil;
public class NetBarBean {
private NetBar netbar=null;
public NetBarBean(){
init();
}
private void init() {
PlatformMgServiceImpl pm=(PlatformMgServiceImpl)SpringWebUtil.getBean((ServletContext)FacesContext.getCurrentInstance().getExternalContext().getContext(), "platformMgService");
netbar=pm.getCurrentNetBarInfo();
}
public NetBar getNetbar() {
return netbar;
}
public void setNetbar(NetBar netbar) {
this.netbar = netbar;
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?