package com.hy.demo.web.action;
import java.io.IOException;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.apache.struts2.ServletActionContext;
import sun.reflect.ReflectionFactory.GetReflectionFactoryAction;
import com.hy.demo.common.BaseAction;
import com.hy.demo.modal.Student;
import com.hy.demo.tools.VOUtils;
import com.sdicons.json.model.JSONObject;
import com.sdicons.json.model.JSONValue;
import com.sun.media.rtsp.protocol.Request;
public class StudentAction extends BaseAction {
private static final long serialVersionUID = 1236034558788877454L;
JSONObject resultObj;
public JSONObject getResultObj() {
return resultObj;
}
public void setResultObj(JSONObject resultObj) {
this.resultObj = resultObj;
}
JSONValue val;
public JSONValue getVal() {
return val;
}
public void setVal(JSONValue val) {
this.val = val;
}
public String findAll() throws IOException {
System.out.println("进入StudentAction");
List<Student> list = new ArrayList();
Student stu = new Student("1","hy","yy");
Student stu1 = new Student("2","tt","gg");
Student stu2 = new Student("3","ee","bb");
Student stu3 = new Student("4","h","kk");
list.add(stu);
list.add(stu1);
list.add(stu2);
list.add(stu3);
//List集合转换为Map集合
Map map = new HashMap();
map.put("total", list.size());
map.put("rows", list);
//writeJson(list);
ServletActionContext.getResponse().getWriter().write(VOUtils.convertVO2String(map));
System.out.println("发送json字符串完成");
return null;
}
}
分享到:
相关推荐
Easy UI Motion allows you to animate your 2D full screen interfaces made with Unity UI, easily and visually. Manage Opening /closing effects, or simple effects on element or groups of elements that ...
代码生成:根据表生成对应的Bean,Service,Mapper,Action,XML等。提高开发效率. 项目说明: 用户名:admin 密 码:为大家方便,我已把密码放到登陆页,无需输入密码即可登陆 运行环境: 硬件平台: CPU:酷睿...
- Alt + Shift + G for Gameplay UI - Alt + Shift + T for Save Game Trigger See it in action! ------------------------------------------------ Easy Main Menu is out of the box integrated with the ...
Web Player | Virtual Controls | Support | ...EasyTouch is written in C#, it notifies you of an action by events. The events are sent by delegate system, or you can use the new EasyTouchTrigger component.
Indicate directly on the screen where to click, type, select, copy, paste, or perform any other common action and UiPath will generate a visual script like in the image below. UiPath's macro recorder...
Its native SDK offers a remarkable range of features including easy-to-build graphical objects, a unique navigation system, and a built-in database, all on a location-knowledgeable device. Websites ...
通过从GitHub UI上单击一个按钮,将代码从存储库部署到选定的环境中。 配置您的环境,以提供最少的信息,并触发GitHub Action,该GitHub Action可将您的代码部署到不同的环境中。 从分支,标记或提交。
4、包含常用的工具:jquery、easy-ui、日期控件、highcharts图表控件、图片放大工具、富文本框等。 此代码包含了所有的jar包,用eclipse导入项目即可。 数据库定义在proxool.properties可自行修改。 国际化字符转换...
The powerful, top-rated dialogue system used in Disco Elysium, Crossing ... Action-RPG Starter Kit Adventure Creator Animator Timeline Editor articy:draft Behavior Designer Bolt Visual Scripting
- Uses native UI elements (native scrolling performance) - Shows spinner animation while website is loading - Bundled with ready-to-use Playmaker action - Perfect for showing external content, such as...
Make Usage Easy and Obvious 49 Use User-Centric Terminology 50 Minimize the Effort Required for User Input 50 Downplay File-Handling Operations 50 Enable Collaboration and Connectedness 51 De-...
ActionServlet (Command) creates and uses Action, an ActionForm, and ActionForward. As mentioned earlier, the struts-config.xml file configures the Command. During the creation of the Web project, ...
Get an overview of what OLAP is, see how easy it is to use OLAP for WinForms, specifically the C1OlapPage control, and explore the Excel-like UI. What's Inside? OLAP for WinForms is a stand-alone ...
Each day's post will have an associated sample project so that you can see the concepts in action. These will all be available in the github repo at github.com/ShinobiControls/iOS7-day-by-day. Let me...
Deliver Professional Applications: Eliminate embarrassing typos from your applications (Windows and Web Forms, UI controls, ToolTips, message boxes, and more). Improve the Quality of Your ...
Powerful and Easy Proxy Application by Luci UI | 强大的代理插件 无需复杂配置就可以分流国内外流量和DNS并配合DnsFilter去广告 Easy to split-flow by inboard/outboard;Easy to split DNS used inner ...
Deliver Professional Applications: Eliminate embarrassing typos from your applications (Windows and Web Forms, UI controls, ToolTips, message boxes, and more). Improve the Quality of Your ...
User friendly frontend dashboard: Allows users to take control of their subscriptions and easy access to their personal information. GDPR Compliant: Users can retrieve and download important personal...
This book is an easy-to-follow, step-by-step beginner's guide covering the full process of creating a game. It is packed with examples and illustrations, with comprehensive coverage of each topic. ...