newsbean.java
来自「一个jsf企业级程序示例实现一些基本功能」· Java 代码 · 共 31 行
JAVA
31 行
package com.wxd.netbar.presentation;
import java.util.List;
import javax.faces.context.FacesContext;
import javax.servlet.ServletContext;
import com.wxd.netbar.service.PlatformMgServiceImpl;
import com.wxd.netbar.util.SpringWebUtil;
public class NewsBean {
private List newsList;
public NewsBean() {
init();
}
private void init() {
PlatformMgServiceImpl pm=(PlatformMgServiceImpl)SpringWebUtil.getBean((ServletContext)FacesContext.getCurrentInstance().getExternalContext().getContext(), "platformMgService");
newsList=pm.getAllTopNews();
}
public List getNewsList() {
return newsList;
}
public void setNewsList(List newsList) {
this.newsList = newsList;
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?