Script.aculo.us InPlaceEditor 使用示例
2009-11-13 16:50
447 查看
1,注意,保证JSP页面编码方式是"UTF-8"
2, 注意,InPlaceEditor Ajax 请求形式为"POST",应注意服务器端处理请求响应方法为"doPost"
客户端示例代码如下:
2, 注意,InPlaceEditor Ajax 请求形式为"POST",应注意服务器端处理请求响应方法为"doPost"
客户端示例代码如下:
package org.chy.ajax; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.io.PrintWriter; import javax.servlet.ServletException; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; public class InPlaceEditor extends HttpServlet { @Override protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { response.setContentType("text/html"); response.setCharacterEncoding("UTF-8"); PrintWriter out = response.getWriter(); //打印客户端请求的数据 /* BufferedReader br = new BufferedReader(new InputStreamReader(request.getInputStream())); String line; while((line = br.readLine()) != null){ System.out.println(line); }*/ String value = request.getParameter("value"); System.out.println("value:"+value); String editorId = request.getParameter("editorId"); System.out.println("editorId:"+editorId); out.print(value); out.flush(); out.close(); } }
相关文章推荐
- Script.aculo.us开发系列(七):InPlaceEditor控件的使用
- Script.aculo.us开发系列(八):使用DropDrag定义拖拽行为
- Script.aculo.us开发系列(9):Slider控件的使用
- jquery-in-place-editor
- JavaScript中“过于”犀利地for/in循环使用示例
- 使用ASP.NET Atlas开发In Place Editing输入控件
- Chapter 4. Introducing script.aculo.us
- Script.aculo.us开发系列全集
- Configration in script(uci 脚本使用bug,以及API分析)
- WPF中使用InPlaceBitmapMetadataWriter在图片中插入元数据(metadata)
- Where is the best place to put <script> tags in HTML markup?
- Script.aculo.us 部分特效展览
- Matlab使用技巧:Rapid Code Iteration Using Cells in the Editor
- Prototype入门_chp2 - [Prototype/script.aculo.us]
- Prototype and script.aculo.us: You Never Knew JavaScript Could Do This!
- CocoaPods使用中的invalid byte sequence in US-ASCII错误
- MySQL下使用Inplace和Online方式创建索引的教程
- 使用 SAPscript 打印的示例程序
- ASPxScheduler 自定义 InplaceEditor