67,513
社区成员
发帖
与我相关
我的任务
分享
public class Test{
public static List getValue(){
return new Value().getValue();
}
}
public class Value{
IOneDAO oneDAO;
public List getValue(){
System.out.println("---get here---");
List list = oneDAO.findAll();
return list;
}
oneDAO getter and setter...
}
<s:iterator value="@com.util.Test@getValue()" status="stu" id="value">
<option><s:property value="value"/></option>
</s:iterator>
Value v = new Value();
WebApplicationContext ctx = WebApplicationContextUtils.getWebApplicationContext(application);
IOneDAO dao = (IOneDAO )ctx.getBean("oneDAO");
v.setOneDAO(dao);
List l = v.getValue();
public class Test{
public static List getValue(){
return new Value().getValue();
}
}
public class Value{
IOneDAO oneDAO;
public List getValue(){
System.out.println("---get here---");
List list = oneDAO.findAll();
return list;
}
oneDAO getter and setter...
}
Value v = new Value();
WebApplicationContext ctx = WebApplicationContextUtils.getWebApplicationContext(application);
IOneDAO bdrd = (IOneDAO )ctx.getBean("oneDAO");
v.setOneDAO();