- 浏览: 21367647 次
- 性别:
- 来自: 杭州
最新评论
-
ZY199266:
配置文件还需要额外的配置ma
Android 客户端通过内置API(HttpClient) 访问 服务器(用Spring MVC 架构) 返回的json数据全过程 -
ZY199266:
我的一访问为什么是 /mavenwebdemo/WEB-I ...
Android 客户端通过内置API(HttpClient) 访问 服务器(用Spring MVC 架构) 返回的json数据全过程 -
lvgaga:
我又一个问题就是 如果像你的这种形式写。配置文件还需要额外的 ...
Android 客户端通过内置API(HttpClient) 访问 服务器(用Spring MVC 架构) 返回的json数据全过程 -
lvgaga:
我的一访问为什么是 /mavenwebdemo/WEB-I ...
Android 客户端通过内置API(HttpClient) 访问 服务器(用Spring MVC 架构) 返回的json数据全过程 -
y1210251848:
你的那个错误应该是项目所使用的目标框架不支持吧
log4net配置(web中使用log4net,把web.config放在单独的文件中)
AJAX框架 jMaki (三) – 用日历(Calendar)和表格(Table)实现的Blog首页
下面使用jMaki中的Yahoo Calendar和Yahoo DataTable 来建立一个迷你Blog首页。这个小程序可以在选择日历的某个日期后,Data Table中只列出这个日期所发表的文章。
jMaki中的Yahoo Calendar和Yahoo DataTable 都是Yahoo UI Library 中的控间, jMaki的作用只是在现有的控件之上作了一些包装(wrapper), 这样,这些Widget可以通过jMaki框架进行通讯,通过很少的代码或者配置就可以完成一个功能丰富的应用程序,也就是通常所说的mashup.
使用NetBeans开发迷你Blog首页的步骤
1. NetBeans 菜单”文件”-”新建项目”.在出现的”新建项目”窗口中,”类别”选择”Web”, 项目选择”Web应用程序”.点击”下一步”
2. 在”新建项目窗口中”, “项目名称”中输入”jMakiCalendarTable”项目. 点击”下一步”
3. 在”框架”窗口中,选择”jMaki Ajax Framework” . 点击”完成”.
4. NetBeans 中出现 jMakiCalendarTable 项目的同时,也会出现在”组件面板”中出现jMaki的Widgets, 包括Dojo, Flickr, Google, Yahoo等中的一些Widgets. 如果没有出现”组件面板”, 选择菜单”窗口”-> “组件面板”.
5. 在netBeans中, 用鼠标直接把”jMaki Yahoo”下的Calendar拖到 jMakiCalendarDemo 项目中的index.jsp文件中. 通常日历会放在左侧栏或者右侧栏中. 这个例子中放在 6. 修改index.jsp 中”yahoo.dataTable”的内容 <widget name="yahoo.dataTable"></widget> value="{columns : [ { label : 'Post Date', id : 'postdate'}, { label : 'Title', id : 'title'}, { label : 'Author', id : 'author'} ], rows : [ { postdate : '2007/09/07', title : 'NetBeans New and Cool', author : 'Tim Boudreau'}, { postdate : '2007/09/07', title : 'NetBeans Mobility', author : 'Ada Li'}, { postdate : '2007/09/07', title : 'Creating Web 2.0 Rich Internet Applications', author : 'Michael Li'}, { postdate : '2007/09/08', title : 'AJAX and JSF', author : 'Ada Li'}, { postdate : '2007/09/09', title : 'Ruby on Rails in the Enterprise', author : 'Liang Ye'}, { postdate : '2007/09/09', title : 'Beans Binding and the Swing Application Framework', author : 'Joey Shen'} ] }" /> 7. 初始运行jMakiCalendarTable 结果如下: 8. 要完成这个迷你Blog首页,要做以下几部分工作 获得Calendar的日期 日期发送给服务器端 服务器端返回给客户端列表,列表只包含对应日期的信息 返回的列表信息更新到DataTable 要获得Calendar的日期,根据之前介绍的“发布/订阅机制(publish/subscribe machnism)”, 在index.jsp 的calendar Widget下加入 以下代码<script></script>代码 因为在web/resources/yahoo/calendar/compenent.js中已经发布(publish)了”/yahoo/calendar/onSelect”, 因此在这段JavaScript中可以直接订阅(subscribe)“/yahoo/calendar/onSelect” topic, 这样在选择Calendar的某个日期时,调用函数calendarListener(). 函数calendarListener()完成两件事情, 一个是得到Calendar下显示选中的日期,日期格式为“yyyy/mm/dd”,并显示在定义好的 SelectCallBack()函数是AJAX请求返回的回调函数, 得到服务器端返回的信息后, 发布(publish) “"/table/topic/clear"和”/table/topic/addRows”, 并传递了相关参数. 相应地在 yahoo.dataTable 中订阅(subscribe)这些” topic” 修改dataTable Widget为: DataTable中 rows内容为空,下面要把这部分信息放在服务器端的Servlet中, 9. 修改后的index.jsp的源代码如下: 10. 新建BlogServlet, 作为服务器端接受,处理信息以及返回信息的类. 鼠标右键盘选择项目"jMakiCalendarTable", 选择"新建"->"Servlet", 类名:BlogServlet 包:com.sun.sdn.demo.jmaki 点击"下一步" 修改BlogServlet中protected void processRequest()方法, 内容如下 processRequest()主要作用是根据日期,筛选显示内容, 并以JSON格式返回给客户端. 11. 最终运行结果如下: 最后需要提到的是, jMaki还在发展中, 请到https://ajax.dev.java.net/下载最新的包和plug-in. 参考: https://ajax.dev.java.net/samples/samples.html http://wiki.java.net/bin/view/Projects/jMakiDataModels http://developer.yahoo.com/yui/datatable/ http://blogs.sun.com/arungupta/entry/jmaki_filters_runners_mashup http://blogs.sun.com/patriceg/ 下面使用jMaki中的Yahoo Calendar和Yahoo DataTable 来建立一个迷你Blog首页。这个小程序可以在选择日历的某个日期后,Data Table中只列出这个日期所发表的文章。 jMaki中的Yahoo Calendar和Yahoo DataTable 都是Yahoo UI Library 中的控间, jMaki的作用只是在现有的控件之上作了一些包装(wrapper), 这样,这些Widget可以通过jMaki框架进行通讯,通过很少的代码或者配置就可以完成一个功能丰富的应用程序,也就是通常所说的mashup. 使用NetBeans开发迷你Blog首页的步骤 1. NetBeans 菜单”文件”-”新建项目”.在出现的”新建项目”窗口中,”类别”选择”Web”, 项目选择”Web应用程序”.点击”下一步” 2. 在”新建项目窗口中”, “项目名称”中输入”jMakiCalendarTable”项目. 点击”下一步” 3. 在”框架”窗口中,选择”jMaki Ajax Framework” . 点击”完成”. 4. NetBeans 中出现 jMakiCalendarTable 项目的同时,也会出现在”组件面板”中出现jMaki的Widgets, 包括Dojo, Flickr, Google, Yahoo等中的一些Widgets. 如果没有出现”组件面板”, 选择菜单”窗口”-> “组件面板”. 5. 在netBeans中, 用鼠标直接把”jMaki Yahoo”下的Calendar拖到 jMakiCalendarDemo 项目中的index.jsp文件中. 通常日历会放在左侧栏或者右侧栏中. 这个例子中放在 6. 修改index.jsp 中”yahoo.dataTable”的内容 <widget name="yahoo.dataTable"></widget> value="{columns : [ { label : 'Post Date', id : 'postdate'}, { label : 'Title', id : 'title'}, { label : 'Author', id : 'author'} ], rows : [ { postdate : '2007/09/07', title : 'NetBeans New and Cool', author : 'Tim Boudreau'}, { postdate : '2007/09/07', title : 'NetBeans Mobility', author : 'Ada Li'}, { postdate : '2007/09/07', title : 'Creating Web 2.0 Rich Internet Applications', author : 'Michael Li'}, { postdate : '2007/09/08', title : 'AJAX and JSF', author : 'Ada Li'}, { postdate : '2007/09/09', title : 'Ruby on Rails in the Enterprise', author : 'Liang Ye'}, { postdate : '2007/09/09', title : 'Beans Binding and the Swing Application Framework', author : 'Joey Shen'} ] }" /> 7. 初始运行jMakiCalendarTable 结果如下: 8. 要完成这个迷你Blog首页,要做以下几部分工作 获得Calendar的日期 日期发送给服务器端 服务器端返回给客户端列表,列表只包含对应日期的信息 返回的列表信息更新到DataTable 要获得Calendar的日期,根据之前介绍的“发布/订阅机制(publish/subscribe machnism)”, 在index.jsp 的calendar Widget下加入 以下代码<script></script>代码 因为在web/resources/yahoo/calendar/compenent.js中已经发布(publish)了”/yahoo/calendar/onSelect”, 因此在这段JavaScript中可以直接订阅(subscribe)“/yahoo/calendar/onSelect” topic, 这样在选择Calendar的某个日期时,调用函数calendarListener(). 函数calendarListener()完成两件事情, 一个是得到Calendar下显示选中的日期,日期格式为“yyyy/mm/dd”,并显示在定义好的 SelectCallBack()函数是AJAX请求返回的回调函数, 得到服务器端返回的信息后, 发布(publish) “"/table/topic/clear"和”/table/topic/addRows”, 并传递了相关参数. 相应地在 yahoo.dataTable 中订阅(subscribe)这些” topic” 修改dataTable Widget为: DataTable中 rows内容为空,下面要把这部分信息放在服务器端的Servlet中, 9. 修改后的index.jsp的源代码如下: 10. 新建BlogServlet, 作为服务器端接受,处理信息以及返回信息的类. 鼠标右键盘选择项目"jMakiCalendarTable", 选择"新建"->"Servlet", 类名:BlogServlet 包:com.sun.sdn.demo.jmaki 点击"下一步" 修改BlogServlet中protected void processRequest()方法, 内容如下 processRequest()主要作用是根据日期,筛选显示内容, 并以JSON格式返回给客户端. 11. 最终运行结果如下: 最后需要提到的是, jMaki还在发展中, 请到https://ajax.dev.java.net/下载最新的包和plug-in. 参考: https://ajax.dev.java.net/samples/samples.html http://wiki.java.net/bin/view/Projects/jMakiDataModels http://developer.yahoo.com/yui/datatable/ http://blogs.sun.com/arungupta/entry/jmaki_filters_runners_mashup http://blogs.sun.com/patriceg/ 下面使用jMaki中的Yahoo Calendar和Yahoo DataTable 来建立一个迷你Blog首页。这个小程序可以在选择日历的某个日期后,Data Table中只列出这个日期所发表的文章。 jMaki中的Yahoo Calendar和Yahoo DataTable 都是Yahoo UI Library 中的控间, jMaki的作用只是在现有的控件之上作了一些包装(wrapper), 这样,这些Widget可以通过jMaki框架进行通讯,通过很少的代码或者配置就可以完成一个功能丰富的应用程序,也就是通常所说的mashup. 使用NetBeans开发迷你Blog首页的步骤 1. NetBeans 菜单”文件”-”新建项目”.在出现的”新建项目”窗口中,”类别”选择”Web”, 项目选择”Web应用程序”.点击”下一步” 2. 在”新建项目窗口中”, “项目名称”中输入”jMakiCalendarTable”项目. 点击”下一步” 3. 在”框架”窗口中,选择”jMaki Ajax Framework” . 点击”完成”. 4. NetBeans 中出现 jMakiCalendarTable 项目的同时,也会出现在”组件面板”中出现jMaki的Widgets, 包括Dojo, Flickr, Google, Yahoo等中的一些Widgets. 如果没有出现”组件面板”, 选择菜单”窗口”-> “组件面板”. 5. 在netBeans中, 用鼠标直接把”jMaki Yahoo”下的Calendar拖到 jMakiCalendarDemo 项目中的index.jsp文件中. 通常日历会放在左侧栏或者右侧栏中. 这个例子中放在 6. 修改index.jsp 中”yahoo.dataTable”的内容 <widget name="yahoo.dataTable"></widget> value="{columns : [ { label : 'Post Date', id : 'postdate'}, { label : 'Title', id : 'title'}, { label : 'Author', id : 'author'} ], rows : [ { postdate : '2007/09/07', title : 'NetBeans New and Cool', author : 'Tim Boudreau'}, { postdate : '2007/09/07', title : 'NetBeans Mobility', author : 'Ada Li'}, { postdate : '2007/09/07', title : 'Creating Web 2.0 Rich Internet Applications', author : 'Michael Li'}, { postdate : '2007/09/08', title : 'AJAX and JSF', author : 'Ada Li'}, { postdate : '2007/09/09', title : 'Ruby on Rails in the Enterprise', author : 'Liang Ye'}, { postdate : '2007/09/09', title : 'Beans Binding and the Swing Application Framework', author : 'Joey Shen'} ] }" /> 7. 初始运行jMakiCalendarTable 结果如下: 8. 要完成这个迷你Blog首页,要做以下几部分工作 获得Calendar的日期 日期发送给服务器端 服务器端返回给客户端列表,列表只包含对应日期的信息 返回的列表信息更新到DataTable 要获得Calendar的日期,根据之前介绍的“发布/订阅机制(publish/subscribe machnism)”, 在index.jsp 的calendar Widget下加入 以下代码<script></script>代码 因为在web/resources/yahoo/calendar/compenent.js中已经发布(publish)了”/yahoo/calendar/onSelect”, 因此在这段JavaScript中可以直接订阅(subscribe)“/yahoo/calendar/onSelect” topic, 这样在选择Calendar的某个日期时,调用函数calendarListener(). 函数calendarListener()完成两件事情, 一个是得到Calendar下显示选中的日期,日期格式为“yyyy/mm/dd”,并显示在定义好的 SelectCallBack()函数是AJAX请求返回的回调函数, 得到服务器端返回的信息后, 发布(publish) “"/table/topic/clear"和”/table/topic/addRows”, 并传递了相关参数. 相应地在 yahoo.dataTable 中订阅(subscribe)这些” topic” 修改dataTable Widget为: DataTable中 rows内容为空,下面要把这部分信息放在服务器端的Servlet中, 9. 修改后的index.jsp的源代码如下: 10. 新建BlogServlet, 作为服务器端接受,处理信息以及返回信息的类. 鼠标右键盘选择项目"jMakiCalendarTable", 选择"新建"->"Servlet", 类名:BlogServlet 包:com.sun.sdn.demo.jmaki 点击"下一步" 修改BlogServlet中protected void processRequest()方法, 内容如下 processRequest()主要作用是根据日期,筛选显示内容, 并以JSON格式返回给客户端. 11. 最终运行结果如下: 最后需要提到的是, jMaki还在发展中, 请到https://ajax.dev.java.net/下载最新的包和plug-in. 参考: https://ajax.dev.java.net/samples/samples.html http://wiki.java.net/bin/view/Projects/jMakiDataModels http://developer.yahoo.com/yui/datatable/ http://blogs.sun.com/arungupta/entry/jmaki_filters_runners_mashup http://blogs.sun.com/patriceg/ 下面使用jMaki中的Yahoo Calendar和Yahoo DataTable 来建立一个迷你Blog首页。这个小程序可以在选择日历的某个日期后,Data Table中只列出这个日期所发表的文章。 jMaki中的Yahoo Calendar和Yahoo DataTable 都是Yahoo UI Library 中的控间, jMaki的作用只是在现有的控件之上作了一些包装(wrapper), 这样,这些Widget可以通过jMaki框架进行通讯,通过很少的代码或者配置就可以完成一个功能丰富的应用程序,也就是通常所说的mashup. 使用NetBeans开发迷你Blog首页的步骤 1. NetBeans 菜单”文件”-”新建项目”.在出现的”新建项目”窗口中,”类别”选择”Web”, 项目选择”Web应用程序”.点击”下一步” 2. 在”新建项目窗口中”, “项目名称”中输入”jMakiCalendarTable”项目. 点击”下一步” 3. 在”框架”窗口中,选择”jMaki Ajax Framework” . 点击”完成”. 4. NetBeans 中出现 jMakiCalendarTable 项目的同时,也会出现在”组件面板”中出现jMaki的Widgets, 包括Dojo, Flickr, Google, Yahoo等中的一些Widgets. 如果没有出现”组件面板”, 选择菜单”窗口”-> “组件面板”. 5. 在netBeans中, 用鼠标直接把”jMaki Yahoo”下的Calendar拖到 jMakiCalendarDemo 项目中的index.jsp文件中. 通常日历会放在左侧栏或者右侧栏中. 这个例子中放在 6. 修改index.jsp 中”yahoo.dataTable”的内容 <widget name="yahoo.dataTable"></widget> value="{columns : [ { label : 'Post Date', id : 'postdate'}, { label : 'Title', id : 'title'}, { label : 'Author', id : 'author'} ], rows : [ { postdate : '2007/09/07', title : 'NetBeans New and Cool', author : 'Tim Boudreau'}, { postdate : '2007/09/07', title : 'NetBeans Mobility', author : 'Ada Li'}, { postdate : '2007/09/07', title : 'Creating Web 2.0 Rich Internet Applications', author : 'Michael Li'}, { postdate : '2007/09/08', title : 'AJAX and JSF', author : 'Ada Li'}, { postdate : '2007/09/09', title : 'Ruby on Rails in the Enterprise', author : 'Liang Ye'}, { postdate : '2007/09/09', title : 'Beans Binding and the Swing Application Framework', author : 'Joey Shen'} ] }" /> 7. 初始运行jMakiCalendarTable 结果如下: 8. 要完成这个迷你Blog首页,要做以下几部分工作 获得Calendar的日期 日期发送给服务器端 服务器端返回给客户端列表,列表只包含对应日期的信息 返回的列表信息更新到DataTable 要获得Calendar的日期,根据之前介绍的“发布/订阅机制(publish/subscribe machnism)”, 在index.jsp 的calendar Widget下加入 以下代码<script></script>代码 因为在web/resources/yahoo/calendar/compenent.js中已经发布(publish)了”/yahoo/calendar/onSelect”, 因此在这段JavaScript中可以直接订阅(subscribe)“/yahoo/calendar/onSelect” topic, 这样在选择Calendar的某个日期时,调用函数calendarListener(). 函数calendarListener()完成两件事情, 一个是得到Calendar下显示选中的日期,日期格式为“yyyy/mm/dd”,并显示在定义好的 SelectCallBack()函数是AJAX请求返回的回调函数, 得到服务器端返回的信息后, 发布(publish) “"/table/topic/clear"和”/table/topic/addRows”, 并传递了相关参数. 相应地在 yahoo.dataTable 中订阅(subscribe)这些” topic” 修改dataTable Widget为: DataTable中 rows内容为空,下面要把这部分信息放在服务器端的Servlet中, 9. 修改后的index.jsp的源代码如下: 10. 新建BlogServlet, 作为服务器端接受,处理信息以及返回信息的类. 鼠标右键盘选择项目"jMakiCalendarTable", 选择"新建"->"Servlet", 类名:BlogServlet 包:com.sun.sdn.demo.jmaki 点击"下一步" 修改BlogServlet中protected void processRequest()方法, 内容如下 processRequest()主要作用是根据日期,筛选显示内容, 并以JSON格式返回给客户端. 11. 最终运行结果如下: 最后需要提到的是, jMaki还在发展中, 请到https://ajax.dev.java.net/下载最新的包和plug-in. 参考: https://ajax.dev.java.net/samples/samples.html http://wiki.java.net/bin/view/Projects/jMakiDataModels http://developer.yahoo.com/yui/datatable/ http://blogs.sun.com/arungupta/entry/jmaki_filters_runners_mashup http://blogs.sun.com/patriceg/ 下面使用jMaki中的Yahoo Calendar和Yahoo DataTable 来建立一个迷你Blog首页。这个小程序可以在选择日历的某个日期后,Data Table中只列出这个日期所发表的文章。 jMaki中的Yahoo Calendar和Yahoo DataTable 都是Yahoo UI Library 中的控间, jMaki的作用只是在现有的控件之上作了一些包装(wrapper), 这样,这些Widget可以通过jMaki框架进行通讯,通过很少的代码或者配置就可以完成一个功能丰富的应用程序,也就是通常所说的mashup. 使用NetBeans开发迷你Blog首页的步骤 1. NetBeans 菜单”文件”-”新建项目”.在出现的”新建项目”窗口中,”类别”选择”Web”, 项目选择”Web应用程序”.点击”下一步” 2. 在”新建项目窗口中”, “项目名称”中输入”jMakiCalendarTable”项目. 点击”下一步” 3. 在”框架”窗口中,选择”jMaki Ajax Framework” . 点击”完成”. 4. NetBeans 中出现 jMakiCalendarTable 项目的同时,也会出现在”组件面板”中出现jMaki的Widgets, 包括Dojo, Flickr, Google, Yahoo等中的一些Widgets. 如果没有出现”组件面板”, 选择菜单”窗口”-> “组件面板”. 5. 在netBeans中, 用鼠标直接把”jMaki Yahoo”下的Calendar拖到 jMakiCalendarDemo 项目中的index.jsp文件中. 通常日历会放在左侧栏或者右侧栏中. 这个例子中放在 6. 修改index.jsp 中”yahoo.dataTable”的内容 <widget name="yahoo.dataTable"></widget> value="{columns : [ { label : 'Post Date', id : 'postdate'}, { label : 'Title', id : 'title'}, { label : 'Author', id : 'author'} ], rows : [ { postdate : '2007/09/07', title : 'NetBeans New and Cool', author : 'Tim Boudreau'}, { postdate : '2007/09/07', title : 'NetBeans Mobility', author : 'Ada Li'}, { postdate : '2007/09/07', title : 'Creating Web 2.0 Rich Internet Applications', author : 'Michael Li'}, { postdate : '2007/09/08', title : 'AJAX and JSF', author : 'Ada Li'}, { postdate : '2007/09/09', title : 'Ruby on Rails in the Enterprise', author : 'Liang Ye'}, { postdate : '2007/09/09', title : 'Beans Binding and the Swing Application Framework', author : 'Joey Shen'} ] }" /> 7. 初始运行jMakiCalendarTable 结果如下: 8. 要完成这个迷你Blog首页,要做以下几部分工作 获得Calendar的日期 日期发送给服务器端 服务器端返回给客户端列表,列表只包含对应日期的信息 返回的列表信息更新到DataTable 要获得Calendar的日期,根据之前介绍的“发布/订阅机制(publish/subscribe machnism)”, 在index.jsp 的calendar Widget下加入 以下代码<script></script>代码 因为在web/resources/yahoo/calendar/compenent.js中已经发布(publish)了”/yahoo/calendar/onSelect”, 因此在这段JavaScript中可以直接订阅(subscribe)“/yahoo/calendar/onSelect” topic, 这样在选择Calendar的某个日期时,调用函数calendarListener(). 函数calendarListener()完成两件事情, 一个是得到Calendar下显示选中的日期,日期格式为“yyyy/mm/dd”,并显示在定义好的 SelectCallBack()函数是AJAX请求返回的回调函数, 得到服务器端返回的信息后, 发布(publish) “"/table/topic/clear"和”/table/topic/addRows”, 并传递了相关参数. 相应地在 yahoo.dataTable 中订阅(subscribe)这些” topic” 修改dataTable Widget为: DataTable中 rows内容为空,下面要把这部分信息放在服务器端的Servlet中, 9. 修改后的index.jsp的源代码如下: 10. 新建BlogServlet, 作为服务器端接受,处理信息以及返回信息的类. 鼠标右键盘选择项目"jMakiCalendarTable", 选择"新建"->"Servlet", 类名:BlogServlet 包:com.sun.sdn.demo.jmaki 点击"下一步" 修改BlogServlet中protected void processRequest()方法, 内容如下 processRequest()主要作用是根据日期,筛选显示内容, 并以JSON格式返回给客户端. 11. 最终运行结果如下: 最后需要提到的是, jMaki还在发展中, 请到https://ajax.dev.java.net/下载最新的包和plug-in. 参考: https://ajax.dev.java.net/samples/samples.html http://wiki.java.net/bin/view/Projects/jMakiDataModels http://developer.yahoo.com/yui/datatable/ http://blogs.sun.com/arungupta/entry/jmaki_filters_runners_mashup http://blogs.sun.com/patriceg/ 下面使用jMaki中的Yahoo Calendar和Yahoo DataTable 来建立一个迷你Blog首页。这个小程序可以在选择日历的某个日期后,Data Table中只列出这个日期所发表的文章。 jMaki中的Yahoo Calendar和Yahoo DataTable 都是Yahoo UI Library 中的控间, jMaki的作用只是在现有的控件之上作了一些包装(wrapper), 这样,这些Widget可以通过jMaki框架进行通讯,通过很少的代码或者配置就可以完成一个功能丰富的应用程序,也就是通常所说的mashup. 使用NetBeans开发迷你Blog首页的步骤 1. NetBeans 菜单”文件”-”新建项目”.在出现的”新建项目”窗口中,”类别”选择”Web”, 项目选择”Web应用程序”.点击”下一步” 2. 在”新建项目窗口中”, “项目名称”中输入”jMakiCalendarTable”项目. 点击”下一步” 3. 在”框架”窗口中,选择”jMaki Ajax Framework” . 点击”完成”. 4. NetBeans 中出现 jMakiCalendarTable 项目的同时,也会出现在”组件面板”中出现jMaki的Widgets, 包括Dojo, Flickr, Google, Yahoo等中的一些Widgets. 如果没有出现”组件面板”, 选择菜单”窗口”-> “组件面板”. 5. 在netBeans中, 用鼠标直接把”jMaki Yahoo”下的Calendar拖到 jMakiCalendarDemo 项目中的index.jsp文件中. 通常日历会放在左侧栏或者右侧栏中. 这个例子中放在 6. 修改index.jsp 中”yahoo.dataTable”的内容 <widget name="yahoo.dataTable"></widget> value="{columns : [ { label : 'Post Date', id : 'postdate'}, { label : 'Title', id : 'title'}, { label : 'Author', id : 'author'} ], rows : [ { postdate : '2007/09/07', title : 'NetBeans New and Cool', author : 'Tim Boudreau'}, { postdate : '2007/09/07', title : 'NetBeans Mobility', author : 'Ada Li'}, { postdate : '2007/09/07', title : 'Creating Web 2.0 Rich Internet Applications', author : 'Michael Li'}, { postdate : '2007/09/08', title : 'AJAX and JSF', author : 'Ada Li'}, { postdate : '2007/09/09', title : 'Ruby on Rails in the Enterprise', author : 'Liang Ye'}, { postdate : '2007/09/09', title : 'Beans Binding and the Swing Application Framework', author : 'Joey Shen'} ] }" /> 7. 初始运行jMakiCalendarTable 结果如下: 8. 要完成这个迷你Blog首页,要做以下几部分工作 获得Calendar的日期 日期发送给服务器端 服务器端返回给客户端列表,列表只包含对应日期的信息 返回的列表信息更新到DataTable 要获得Calendar的日期,根据之前介绍的“发布/订阅机制(publish/subscribe machnism)”, 在index.jsp 的calendar Widget下加入 以下代码<script></script>代码 因为在web/resources/yahoo/calendar/compenent.js中已经发布(publish)了”/yahoo/calendar/onSelect”, 因此在这段JavaScript中可以直接订阅(subscribe)“/yahoo/calendar/onSelect” topic, 这样在选择Calendar的某个日期时,调用函数calendarListener(). 函数calendarListener()完成两件事情, 一个是得到Calendar下显示选中的日期,日期格式为“yyyy/mm/dd”,并显示在定义好的 SelectCallBack()函数是AJAX请求返回的回调函数, 得到服务器端返回的信息后, 发布(publish) “"/table/topic/clear"和”/table/topic/addRows”, 并传递了相关参数. 相应地在 yahoo.dataTable 中订阅(subscribe)这些” topic” 修改dataTable Widget为: DataTable中 rows内容为空,下面要把这部分信息放在服务器端的Servlet中, 9. 修改后的index.jsp的源代码如下: 10. 新建BlogServlet, 作为服务器端接受,处理信息以及返回信息的类. 鼠标右键盘选择项目"jMakiCalendarTable", 选择"新建"->"Servlet", 类名:BlogServlet 包:com.sun.sdn.demo.jmaki 点击"下一步" 修改BlogServlet中protected void processRequest()方法, 内容如下 processRequest()主要作用是根据日期,筛选显示内容, 并以JSON格式返回给客户端. 11. 最终运行结果如下: 最后需要提到的是, jMaki还在发展中, 请到https://ajax.dev.java.net/下载最新的包和plug-in. 参考: https://ajax.dev.java.net/samples/samples.html http://wiki.java.net/bin/view/Projects/jMakiDataModels http://developer.yahoo.com/yui/datatable/ http://blogs.sun.com/arungupta/entry/jmaki_filters_runners_mashup http://blogs.sun.com/patriceg/ 下面使用jMaki中的Yahoo Calendar和Yahoo DataTable 来建立一个迷你Blog首页。这个小程序可以在选择日历的某个日期后,Data Table中只列出这个日期所发表的文章。 jMaki中的Yahoo Calendar和Yahoo DataTable 都是Yahoo UI Library 中的控间, jMaki的作用只是在现有的控件之上作了一些包装(wrapper), 这样,这些Widget可以通过jMaki框架进行通讯,通过很少的代码或者配置就可以完成一个功能丰富的应用程序,也就是通常所说的mashup. 使用NetBeans开发迷你Blog首页的步骤 1. NetBeans 菜单”文件”-”新建项目”.在出现的”新建项目”窗口中,”类别”选择”Web”, 项目选择”Web应用程序”.点击”下一步” 2. 在”新建项目窗口中”, “项目名称”中输入”jMakiCalendarTable”项目. 点击”下一步” 3. 在”框架”窗口中,选择”jMaki Ajax Framework” . 点击”完成”. 4. NetBeans 中出现 jMakiCalendarTable 项目的同时,也会出现在”组件面板”中出现jMaki的Widgets, 包括Dojo, Flickr, Google, Yahoo等中的一些Widgets. 如果没有出现”组件面板”, 选择菜单”窗口”-> “组件面板”. 5. 在netBeans中, 用鼠标直接把”jMaki Yahoo”下的Calendar拖到 jMakiCalendarDemo 项目中的index.jsp文件中. 通常日历会放在左侧栏或者右侧栏中. 这个例子中放在 6. 修改index.jsp 中”yahoo.dataTable”的内容 <widget name="yahoo.dataTable"></widget> value="{columns : [ { label : 'Post Date', id : 'postdate'}, { label : 'Title', id : 'title'}, { label : 'Author', id : 'author'} ], rows : [ { postdate : '2007/09/07', title : 'NetBeans New and Cool', author : 'Tim Boudreau'}, { postdate : '2007/09/07', title : 'NetBeans Mobility', author : 'Ada Li'}, { postdate : '2007/09/07', title : 'Creating Web 2.0 Rich Internet Applications', author : 'Michael Li'}, { postdate : '2007/09/08', title : 'AJAX and JSF', author : 'Ada Li'}, { postdate : '2007/09/09', title : 'Ruby on Rails in the Enterprise', author : 'Liang Ye'}, { postdate : '2007/09/09', title : 'Beans Binding and the Swing Application Framework', author : 'Joey Shen'} ] }" /> 7. 初始运行jMakiCalendarTable 结果如下: 8. 要完成这个迷你Blog首页,要做以下几部分工作 获得Calendar的日期 日期发送给服务器端 服务器端返回给客户端列表,列表只包含对应日期的信息 返回的列表信息更新到DataTable 要获得Calendar的日期,根据之前介绍的“发布/订阅机制(publish/subscribe machnism)”, 在index.jsp 的calendar Widget下加入 以下代码<script></script>代码 因为在web/resources/yahoo/calendar/compenent.js中已经发布(publish)了”/yahoo/calendar/onSelect”, 因此在这段JavaScript中可以直接订阅(subscribe)“/yahoo/calendar/onSelect” topic, 这样在选择Calendar的某个日期时,调用函数calendarListener(). 函数calendarListener()完成两件事情, 一个是得到Calendar下显示选中的日期,日期格式为“yyyy/mm/dd”,并显示在定义好的 SelectCallBack()函数是AJAX请求返回的回调函数, 得到服务器端返回的信息后, 发布(publish) “"/table/topic/clear"和”/table/topic/addRows”, 并传递了相关参数. 相应地在 yahoo.dataTable 中订阅(subscribe)这些” topic” 修改dataTable Widget为: DataTable中 rows内容为空,下面要把这部分信息放在服务器端的Servlet中, 9. 修改后的index.jsp的源代码如下: 10. 新建BlogServlet, 作为服务器端接受,处理信息以及返回信息的类. 鼠标右键盘选择项目"jMakiCalendarTable", 选择"新建"->"Servlet", 类名:BlogServlet 包:com.sun.sdn.demo.jmaki 点击"下一步" 修改BlogServlet中protected void processRequest()方法, 内容如下 processRequest()主要作用是根据日期,筛选显示内容, 并以JSON格式返回给客户端. 11. 最终运行结果如下: 最后需要提到的是, jMaki还在发展中, 请到https://ajax.dev.java.net/下载最新的包和plug-in. 参考: https://ajax.dev.java.net/samples/samples.html http://wiki.java.net/bin/view/Projects/jMakiDataModels http://developer.yahoo.com/yui/datatable/ http://blogs.sun.com/arungupta/entry/jmaki_filters_runners_mashup http://blogs.sun.com/patriceg/ 下面使用jMaki中的Yahoo Calendar和Yahoo DataTable 来建立一个迷你Blog首页。这个小程序可以在选择日历的某个日期后,Data Table中只列出这个日期所发表的文章。 jMaki中的Yahoo Calendar和Yahoo DataTable 都是Yahoo UI Library 中的控间, jMaki的作用只是在现有的控件之上作了一些包装(wrapper), 这样,这些Widget可以通过jMaki框架进行通讯,通过很少的代码或者配置就可以完成一个功能丰富的应用程序,也就是通常所说的mashup. 使用NetBeans开发迷你Blog首页的步骤 1. NetBeans 菜单”文件”-”新建项目”.在出现的”新建项目”窗口中,”类别”选择”Web”, 项目选择”Web应用程序”.点击”下一步” 2. 在”新建项目窗口中”, “项目名称”中输入”jMakiCalendarTable”项目. 点击”下一步” 3. 在”框架”窗口中,选择”jMaki Ajax Framework” . 点击”完成”. 4. NetBeans 中出现 jMakiCalendarTable 项目的同时,也会出现在”组件面板”中出现jMaki的Widgets, 包括Dojo, Flickr, Google, Yahoo等中的一些Widgets. 如果没有出现”组件面板”, 选择菜单”窗口”-> “组件面板”. 5. 在netBeans中, 用鼠标直接把”jMaki Yahoo”下的Calendar拖到 jMakiCalendarDemo 项目中的index.jsp文件中. 通常日历会放在左侧栏或者右侧栏中. 这个例子中放在 6. 修改index.jsp 中”yahoo.dataTable”的内容 <widget name="yahoo.dataTable"></widget> value="{columns : [ { label : 'Post Date', id : 'postdate'}, { label : 'Title', id : 'title'}, { label : 'Author', id : 'author'} ], rows : [ { postdate : '2007/09/07', title : 'NetBeans New and Cool', author : 'Tim Boudreau'}, { postdate : '2007/09/07', title : 'NetBeans Mobility', author : 'Ada Li'}, { postdate : '2007/09/07', title : 'Creating Web 2.0 Rich Internet Applications', author : 'Michael Li'}, { postdate : '2007/09/08', title : 'AJAX and JSF', author : 'Ada Li'}, { postdate : '2007/09/09', title : 'Ruby on Rails in the Enterprise', author : 'Liang Ye'}, { postdate : '2007/09/09', title : 'Beans Binding and the Swing Application Framework', author : 'Joey Shen'} ] }" /> 7. 初始运行jMakiCalendarTable 结果如下: 8. 要完成这个迷你Blog首页,要做以下几部分工作 获得Calendar的日期 日期发送给服务器端 服务器端返回给客户端列表,列表只包含对应日期的信息 返回的列表信息更新到DataTable 要获得Calendar的日期,根据之前介绍的“发布/订阅机制(publish/subscribe machnism)”, 在index.jsp 的calendar Widget下加入 以下代码<script></script>代码 因为在web/resources/yahoo/calendar/compenent.js中已经发布(publish)了”/yahoo/calendar/onSelect”, 因此在这段JavaScript中可以直接订阅(subscribe)“/yahoo/calendar/onSelect” topic, 这样在选择Calendar的某个日期时,调用函数calendarListener(). 函数calendarListener()完成两件事情, 一个是得到Calendar下显示选中的日期,日期格式为“yyyy/mm/dd”,并显示在定义好的 SelectCallBack()函数是AJAX请求返回的回调函数, 得到服务器端返回的信息后, 发布(publish) “"/table/topic/clear"和”/table/topic/addRows”, 并传递了相关参数. 相应地在 yahoo.dataTable 中订阅(subscribe)这些” topic” 修改dataTable Widget为: DataTable中 rows内容为空,下面要把这部分信息放在服务器端的Servlet中, 9. 修改后的index.jsp的源代码如下: 10. 新建BlogServlet, 作为服务器端接受,处理信息以及返回信息的类. 鼠标右键盘选择项目"jMakiCalendarTable", 选择"新建"->"Servlet", 类名:BlogServlet 包:com.sun.sdn.demo.jmaki 点击"下一步" 修改BlogServlet中protected void processRequest()方法, 内容如下 processRequest()主要作用是根据日期,筛选显示内容, 并以JSON格式返回给客户端. 11. 最终运行结果如下: 最后需要提到的是, jMaki还在发展中, 请到https://ajax.dev.java.net/下载最新的包和plug-in. 参考: https://ajax.dev.java.net/samples/samples.html http://wiki.java.net/bin/view/Projects/jMakiDataModels http://developer.yahoo.com/yui/datatable/ http://blogs.sun.com/arungupta/entry/jmaki_filters_runners_mashup http://blogs.sun.com/patriceg/ 下面使用jMaki中的Yahoo Calendar和Yahoo DataTable 来建立一个迷你Blog首页。这个小程序可以在选择日历的某个日期后,Data Table中只列出这个日期所发表的文章。 jMaki中的Yahoo Calendar和Yahoo DataTable 都是Yahoo UI Library 中的控间, jMaki的作用只是在现有的控件之上作了一些包装(wrapper), 这样,这些Widget可以通过jMaki框架进行通讯,通过很少的代码或者配置就可以完成一个功能丰富的应用程序,也就是通常所说的mashup. 使用NetBeans开发迷你Blog首页的步骤 1. NetBeans 菜单”文件”-”新建项目”.在出现的”新建项目”窗口中,”类别”选择”Web”, 项目选择”Web应用程序”.点击”下一步” 2. 在”新建项目窗口中”, “项目名称”中输入”jMakiCalendarTable”项目. 点击”下一步” 3. 在”框架”窗口中,选择”jMaki Ajax Framework” . 点击”完成”. 4. NetBeans 中出现 jMakiCalendarTable 项目的同时,也会出现在”组件面板”中出现jMaki的Widgets, 包括Dojo, Flickr, Google, Yahoo等中的一些Widgets. 如果没有出现”组件面板”, 选择菜单”窗口”-> “组件面板”. 5. 在netBeans中, 用鼠标直接把”jMaki Yahoo”下的Calendar拖到 jMakiCalendarDemo 项目中的index.jsp文件中. 通常日历会放在左侧栏或者右侧栏中. 这个例子中放在 6. 修改index.jsp 中”yahoo.dataTable”的内容 <widget name="yahoo.dataTable"></widget> value="{columns : [ { label : 'Post Date', id : 'postdate'}, { label : 'Title', id : 'title'}, { label : 'Author', id : 'author'} ], rows : [ { postdate : '2007/09/07', title : 'NetBeans New and Cool', author : 'Tim Boudreau'}, { postdate : '2007/09/07', title : 'NetBeans Mobility', author : 'Ada Li'}, { postdate : '2007/09/07', title : 'Creating Web 2.0 Rich Internet Applications', author : 'Michael Li'}, { postdate : '2007/09/08', title : 'AJAX and JSF', author : 'Ada Li'}, { postdate : '2007/09/09', title : 'Ruby on Rails in the Enterprise', author : 'Liang Ye'}, { postdate : '2007/09/09', title : 'Beans Binding and the Swing Application Framework', author : 'Joey Shen'} ] }" /> 7. 初始运行jMakiCalendarTable 结果如下: 8. 要完成这个迷你Blog首页,要做以下几部分工作 获得Calendar的日期 日期发送给服务器端 服务器端返回给客户端列表,列表只包含对应日期的信息 返回的列表信息更新到DataTable 要获得Calendar的日期,根据之前介绍的“发布/订阅机制(publish/subscribe machnism)”, 在index.jsp 的calendar Widget下加入 以下代码<script></script>代码 因为在web/resources/yahoo/calendar/compenent.js中已经发布(publish)了”/yahoo/calendar/onSelect”, 因此在这段JavaScript中可以直接订阅(subscribe)“/yahoo/calendar/onSelect” topic, 这样在选择Calendar的某个日期时,调用函数calendarListener(). 函数calendarListener()完成两件事情, 一个是得到Calendar下显示选中的日期,日期格式为“yyyy/mm/dd”,并显示在定义好的 SelectCallBack()函数是AJAX请求返回的回调函数, 得到服务器端返回的信息后, 发布(publish) “"/table/topic/clear"和”/table/topic/addRows”, 并传递了相关参数. 相应地在 yahoo.dataTable 中订阅(subscribe)这些” topic” 修改dataTable Widget为: DataTable中 rows内容为空,下面要把这部分信息放在服务器端的Servlet中, 9. 修改后的index.jsp的源代码如下: 10. 新建BlogServlet, 作为服务器端接受,处理信息以及返回信息的类. 鼠标右键盘选择项目"jMakiCalendarTable", 选择"新建"->"Servlet", 类名:BlogServlet 包:com.sun.sdn.demo.jmaki 点击"下一步" 修改BlogServlet中protected void processRequest()方法, 内容如下 processRequest()主要作用是根据日期,筛选显示内容, 并以JSON格式返回给客户端. 11. 最终运行结果如下: 最后需要提到的是, jMaki还在发展中, 请到https://ajax.dev.java.net/下载最新的包和plug-in. 参考: https://ajax.dev.java.net/samples/samples.html http://wiki.java.net/bin/view/Projects/jMakiDataModels http://developer.yahoo.com/yui/datatable/ http://blogs.sun.com/arungupta/entry/jmaki_filters_runners_mashup http://blogs.sun.com/patriceg/ yyyjine:
en 还有很多啊 比如微软的exchange (国内够是免费的) 国产的gcmail邮件服务器 ...
salinrong:
。。。怎么都有重复的啊 。还这么多的
b200310012:
真长。
heisalittlebird:
太复杂了
hp92palm:
真长。
fqrfans:
shanghaimilexinxi:
上海米勒信息科技公司是一个坐落于中国上海的专业网站团队,公司目前准备经营网站有 www.mille...
shanghaimilexinxi:
上海米勒信息科技公司是一个坐落于中国上海的专业网站团队,公司目前准备经营网站有 www.mille...
lahvey:
几年之后,依然赞同
caochunhui550383761:
SidebarContentHere
a:widgetname="yahoo.calendar"/>
divid="selected_date">div>
script>...
functionselectCallBack(_req)...{
vartmp=_req.responseText;
varobj=eval("("+tmp+")");
jmaki.log("tmp"+obj);
jmaki.publish("/table/topic/clear",...{});
jmaki.publish("/table/topic/addRows",obj);
}
functioncalendarListener(item)...{
vartargetDiv=document.getElementById("selected_date");
varselectedDateStr=item.value.getFullYear()
+"/"+(item.value.getMonth()+1)
+"/"+item.value.getDate();
targetDiv.innerHTML=selectedDateStr;
varbackEndUrl="BlogServlet?date="+selectedDateStr;
jmaki.doAjax(...{method:"POST",url:backEndUrl,callback:selectCallBack});
}
jmaki.subscribe("/yahoo/calendar/onSelect",calendarListener);
script>
div><!--</span><span style="COLOR: #008000">leftSidebar</span><span style="COLOR: #008000">-->
value="{columns:[
{label:'PostDate',id:'postdate'},
{label:'Title',id:'title'},
{label:'Author',id:'author'}
],
rows:[]
}"
/>
DOCTYPEhtmlPUBLIC"-//W3C//DTDXHTML1.0Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
html>
head>
linkrel="stylesheet"href="jmaki-standard.css"type="text/css">link>
title>PageTitletitle>
metahttp-equiv="Content-Type"content="text/html;charset=iso-8859-1"/>
head>
body>
divclass="outerBorder">
divclass="header">
divclass="banner">ApplicationNamediv>
divclass="subheader">
div>
ahref="mailto:feedback@youraddress">Feedbacka>|
ahref="#">SiteMapa>|
ahref="#">Homea>
div>
div><!--</span><span style="COLOR: #000000">sub</span><span style="COLOR: #000000">-</span><span style="COLOR: #000000">header</span><span style="COLOR: #000000">-->
div><!--</span><span style="COLOR: #000000">header</span><span style="COLOR: #000000">-->
divclass="main">
divclass="leftSidebar">
SidebarContentHere
a:widgetname="yahoo.calendar"/>
divid="selected_date">div>
script>
functionselectCallBack(_req)...{
vartmp=_req.responseText;
varobj=eval("("+tmp+")");
jmaki.log("tmp"+obj);
jmaki.publish("/table/topic/clear",...{});
jmaki.publish("/table/topic/addRows",obj);
}
functioncalendarListener(item)...{
vartargetDiv=document.getElementById("selected_date");
varselectedDateStr=item.value.getFullYear()
+"/"+(item.value.getMonth()+1)
+"/"+item.value.getDate();
targetDiv.innerHTML=selectedDateStr;
varbackEndUrl="BlogServlet?date="+selectedDateStr;
jmaki.doAjax(...{method:"POST",url:backEndUrl,callback:selectCallBack});
}
jmaki.subscribe("/yahoo/calendar/onSelect",calendarListener);
script>
div><!--</span><span style="COLOR: #000000">leftSidebar</span><span style="COLOR: #000000">-->
divclass="content"style="height:400px">
MainContentArea
a:widgetname="yahoo.dataTable"subscribe="/table/topic"
value="{columns:[
...{label:'PostDate',id:'postdate'},
...{label:'Title',id:'title'},
...{label:'Author',id:'author'}
],
rows:[]
}"
/>
div><!--</span><span style="COLOR: #000000">content</span><span style="COLOR: #000000">-->
div><!--</span><span style="COLOR: #000000">main</span><span style="COLOR: #000000">-->
div><!--</span><span style="COLOR: #000000">outerborder</span><span style="COLOR: #000000">-->
body>
html>
下一个"配置Servlet部署"窗口不做修改, 点击”完成”
throwsServletException,IOException...{
String[][]blogList=...{
...{"2007/09/07","NetBeansNewandCool","TimBoudreau"},
...{"2007/09/07","NetBeansMobility","AdaLi"},
...{"2007/09/07","CreatingWeb2.0RichInternetApplications","MichaelLi"},
...{"2007/09/08","AJAXandJSF","AdaLi"},
...{"2007/09/09","RubyonRailsintheEnterprise","LiangYe"},
...{"2007/09/09","BeansBindingandtheSwingApplicationFramework","JoeyShen"}
};
StringdateParam=request.getParameter("date");
SimpleDateFormatsdf=newSimpleDateFormat("yyyy/MM/dd");
booleanlistAll=false;
Datedate=null;
if(dateParam==null||"".equals(dateParam))...{
date=Calendar.getInstance().getTime();
listAll=true;
}else...{
try...{
date=sdf.parse(dateParam);
}catch(ParseExceptionex)...{
ex.printStackTrace();
}
}
StringdateStr=sdf.format(date);
response.setContentType("text/html;charset=UTF-8");
PrintWriterout=response.getWriter();
out.println("[");
booleanfirst=true;
for(inti=0;iblogList.length;i++)...{
String[]blogItem=blogList[i];
if(listAll||blogItem[0].equals(dateStr))...{//Datematch
if(!first)...{
out.println(",");
}
out.println("{");
out.println("postdate:'"+blogItem[0]+"',");
out.println("title:'"+blogItem[1]+"',");
out.println("author:'"+blogItem[2]+"'");
out.println("}");
first=false;
}//Endif
}//EndiblogListloop
out.println("]");//endrows
out.flush();
out.close();
}
SidebarContentHere
a:widgetname="yahoo.calendar"/>
divid="selected_date">div>
script>...
functionselectCallBack(_req)...{
vartmp=_req.responseText;
varobj=eval("("+tmp+")");
jmaki.log("tmp"+obj);
jmaki.publish("/table/topic/clear",...{});
jmaki.publish("/table/topic/addRows",obj);
}
functioncalendarListener(item)...{
vartargetDiv=document.getElementById("selected_date");
varselectedDateStr=item.value.getFullYear()
+"/"+(item.value.getMonth()+1)
+"/"+item.value.getDate();
targetDiv.innerHTML=selectedDateStr;
varbackEndUrl="BlogServlet?date="+selectedDateStr;
jmaki.doAjax(...{method:"POST",url:backEndUrl,callback:selectCallBack});
}
jmaki.subscribe("/yahoo/calendar/onSelect",calendarListener);
script>
div><!--</span><span style="COLOR: #008000">leftSidebar</span><span style="COLOR: #008000">-->
value="{columns:[
{label:'PostDate',id:'postdate'},
{label:'Title',id:'title'},
{label:'Author',id:'author'}
],
rows:[]
}"
/>
DOCTYPEhtmlPUBLIC"-//W3C//DTDXHTML1.0Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
html>
head>
linkrel="stylesheet"href="jmaki-standard.css"type="text/css">link>
title>PageTitletitle>
metahttp-equiv="Content-Type"content="text/html;charset=iso-8859-1"/>
head>
body>
divclass="outerBorder">
divclass="header">
divclass="banner">ApplicationNamediv>
divclass="subheader">
div>
ahref="mailto:feedback@youraddress">Feedbacka>|
ahref="#">SiteMapa>|
ahref="#">Homea>
div>
div><!--</span><span style="COLOR: #000000">sub</span><span style="COLOR: #000000">-</span><span style="COLOR: #000000">header</span><span style="COLOR: #000000">-->
div><!--</span><span style="COLOR: #000000">header</span><span style="COLOR: #000000">-->
divclass="main">
divclass="leftSidebar">
SidebarContentHere
a:widgetname="yahoo.calendar"/>
divid="selected_date">div>
script>
functionselectCallBack(_req)...{
vartmp=_req.responseText;
varobj=eval("("+tmp+")");
jmaki.log("tmp"+obj);
jmaki.publish("/table/topic/clear",...{});
jmaki.publish("/table/topic/addRows",obj);
}
functioncalendarListener(item)...{
vartargetDiv=document.getElementById("selected_date");
varselectedDateStr=item.value.getFullYear()
+"/"+(item.value.getMonth()+1)
+"/"+item.value.getDate();
targetDiv.innerHTML=selectedDateStr;
varbackEndUrl="BlogServlet?date="+selectedDateStr;
jmaki.doAjax(...{method:"POST",url:backEndUrl,callback:selectCallBack});
}
jmaki.subscribe("/yahoo/calendar/onSelect",calendarListener);
script>
div><!--</span><span style="COLOR: #000000">leftSidebar</span><span style="COLOR: #000000">-->
divclass="content"style="height:400px">
MainContentArea
a:widgetname="yahoo.dataTable"subscribe="/table/topic"
value="{columns:[
...{label:'PostDate',id:'postdate'},
...{label:'Title',id:'title'},
...{label:'Author',id:'author'}
],
rows:[]
}"
/>
div><!--</span><span style="COLOR: #000000">content</span><span style="COLOR: #000000">-->
div><!--</span><span style="COLOR: #000000">main</span><span style="COLOR: #000000">-->
div><!--</span><span style="COLOR: #000000">outerborder</span><span style="COLOR: #000000">-->
body>
html>
下一个"配置Servlet部署"窗口不做修改, 点击”完成”
throwsServletException,IOException...{
String[][]blogList=...{
...{"2007/09/07","NetBeansNewandCool","TimBoudreau"},
...{"2007/09/07","NetBeansMobility","AdaLi"},
...{"2007/09/07","CreatingWeb2.0RichInternetApplications","MichaelLi"},
...{"2007/09/08","AJAXandJSF","AdaLi"},
...{"2007/09/09","RubyonRailsintheEnterprise","LiangYe"},
...{"2007/09/09","BeansBindingandtheSwingApplicationFramework","JoeyShen"}
};
StringdateParam=request.getParameter("date");
SimpleDateFormatsdf=newSimpleDateFormat("yyyy/MM/dd");
booleanlistAll=false;
Datedate=null;
if(dateParam==null||"".equals(dateParam))...{
date=Calendar.getInstance().getTime();
listAll=true;
}else...{
try...{
date=sdf.parse(dateParam);
}catch(ParseExceptionex)...{
ex.printStackTrace();
}
}
StringdateStr=sdf.format(date);
response.setContentType("text/html;charset=UTF-8");
PrintWriterout=response.getWriter();
out.println("[");
booleanfirst=true;
for(inti=0;iblogList.length;i++)...{
String[]blogItem=blogList[i];
if(listAll||blogItem[0].equals(dateStr))...{//Datematch
if(!first)...{
out.println(",");
}
out.println("{");
out.println("postdate:'"+blogItem[0]+"',");
out.println("title:'"+blogItem[1]+"',");
out.println("author:'"+blogItem[2]+"'");
out.println("}");
first=false;
}//Endif
}//EndiblogListloop
out.println("]");//endrows
out.flush();
out.close();
}
SidebarContentHere
a:widgetname="yahoo.calendar"/>
divid="selected_date">div>
script>...
functionselectCallBack(_req)...{
vartmp=_req.responseText;
varobj=eval("("+tmp+")");
jmaki.log("tmp"+obj);
jmaki.publish("/table/topic/clear",...{});
jmaki.publish("/table/topic/addRows",obj);
}
functioncalendarListener(item)...{
vartargetDiv=document.getElementById("selected_date");
varselectedDateStr=item.value.getFullYear()
+"/"+(item.value.getMonth()+1)
+"/"+item.value.getDate();
targetDiv.innerHTML=selectedDateStr;
varbackEndUrl="BlogServlet?date="+selectedDateStr;
jmaki.doAjax(...{method:"POST",url:backEndUrl,callback:selectCallBack});
}
jmaki.subscribe("/yahoo/calendar/onSelect",calendarListener);
script>
div><!--</span><span style="COLOR: #008000">leftSidebar</span><span style="COLOR: #008000">-->
value="{columns:[
{label:'PostDate',id:'postdate'},
{label:'Title',id:'title'},
{label:'Author',id:'author'}
],
rows:[]
}"
/>
DOCTYPEhtmlPUBLIC"-//W3C//DTDXHTML1.0Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
html>
head>
linkrel="stylesheet"href="jmaki-standard.css"type="text/css">link>
title>PageTitletitle>
metahttp-equiv="Content-Type"content="text/html;charset=iso-8859-1"/>
head>
body>
divclass="outerBorder">
divclass="header">
divclass="banner">ApplicationNamediv>
divclass="subheader">
div>
ahref="mailto:feedback@youraddress">Feedbacka>|
ahref="#">SiteMapa>|
ahref="#">Homea>
div>
div><!--</span><span style="COLOR: #000000">sub</span><span style="COLOR: #000000">-</span><span style="COLOR: #000000">header</span><span style="COLOR: #000000">-->
div><!--</span><span style="COLOR: #000000">header</span><span style="COLOR: #000000">-->
divclass="main">
divclass="leftSidebar">
SidebarContentHere
a:widgetname="yahoo.calendar"/>
divid="selected_date">div>
script>
functionselectCallBack(_req)...{
vartmp=_req.responseText;
varobj=eval("("+tmp+")");
jmaki.log("tmp"+obj);
jmaki.publish("/table/topic/clear",...{});
jmaki.publish("/table/topic/addRows",obj);
}
functioncalendarListener(item)...{
vartargetDiv=document.getElementById("selected_date");
varselectedDateStr=item.value.getFullYear()
+"/"+(item.value.getMonth()+1)
+"/"+item.value.getDate();
targetDiv.innerHTML=selectedDateStr;
varbackEndUrl="BlogServlet?date="+selectedDateStr;
jmaki.doAjax(...{method:"POST",url:backEndUrl,callback:selectCallBack});
}
jmaki.subscribe("/yahoo/calendar/onSelect",calendarListener);
script>
div><!--</span><span style="COLOR: #000000">leftSidebar</span><span style="COLOR: #000000">-->
divclass="content"style="height:400px">
MainContentArea
a:widgetname="yahoo.dataTable"subscribe="/table/topic"
value="{columns:[
...{label:'PostDate',id:'postdate'},
...{label:'Title',id:'title'},
...{label:'Author',id:'author'}
],
rows:[]
}"
/>
div><!--</span><span style="COLOR: #000000">content</span><span style="COLOR: #000000">-->
div><!--</span><span style="COLOR: #000000">main</span><span style="COLOR: #000000">-->
div><!--</span><span style="COLOR: #000000">outerborder</span><span style="COLOR: #000000">-->
body>
html>
下一个"配置Servlet部署"窗口不做修改, 点击”完成”
throwsServletException,IOException...{
String[][]blogList=...{
...{"2007/09/07","NetBeansNewandCool","TimBoudreau"},
...{"2007/09/07","NetBeansMobility","AdaLi"},
...{"2007/09/07","CreatingWeb2.0RichInternetApplications","MichaelLi"},
...{"2007/09/08","AJAXandJSF","AdaLi"},
...{"2007/09/09","RubyonRailsintheEnterprise","LiangYe"},
...{"2007/09/09","BeansBindingandtheSwingApplicationFramework","JoeyShen"}
};
StringdateParam=request.getParameter("date");
SimpleDateFormatsdf=newSimpleDateFormat("yyyy/MM/dd");
booleanlistAll=false;
Datedate=null;
if(dateParam==null||"".equals(dateParam))...{
date=Calendar.getInstance().getTime();
listAll=true;
}else...{
try...{
date=sdf.parse(dateParam);
}catch(ParseExceptionex)...{
ex.printStackTrace();
}
}
StringdateStr=sdf.format(date);
response.setContentType("text/html;charset=UTF-8");
PrintWriterout=response.getWriter();
out.println("[");
booleanfirst=true;
for(inti=0;iblogList.length;i++)...{
String[]blogItem=blogList[i];
if(listAll||blogItem[0].equals(dateStr))...{//Datematch
if(!first)...{
out.println(",");
}
out.println("{");
out.println("postdate:'"+blogItem[0]+"',");
out.println("title:'"+blogItem[1]+"',");
out.println("author:'"+blogItem[2]+"'");
out.println("}");
first=false;
}//Endif
}//EndiblogListloop
out.println("]");//endrows
out.flush();
out.close();
}
SidebarContentHere
a:widgetname="yahoo.calendar"/>
divid="selected_date">div>
script>...
functionselectCallBack(_req)...{
vartmp=_req.responseText;
varobj=eval("("+tmp+")");
jmaki.log("tmp"+obj);
jmaki.publish("/table/topic/clear",...{});
jmaki.publish("/table/topic/addRows",obj);
}
functioncalendarListener(item)...{
vartargetDiv=document.getElementById("selected_date");
varselectedDateStr=item.value.getFullYear()
+"/"+(item.value.getMonth()+1)
+"/"+item.value.getDate();
targetDiv.innerHTML=selectedDateStr;
varbackEndUrl="BlogServlet?date="+selectedDateStr;
jmaki.doAjax(...{method:"POST",url:backEndUrl,callback:selectCallBack});
}
jmaki.subscribe("/yahoo/calendar/onSelect",calendarListener);
script>
div><!--</span><span style="COLOR: #008000">leftSidebar</span><span style="COLOR: #008000">-->
value="{columns:[
{label:'PostDate',id:'postdate'},
{label:'Title',id:'title'},
{label:'Author',id:'author'}
],
rows:[]
}"
/>
DOCTYPEhtmlPUBLIC"-//W3C//DTDXHTML1.0Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
html>
head>
linkrel="stylesheet"href="jmaki-standard.css"type="text/css">link>
title>PageTitletitle>
metahttp-equiv="Content-Type"content="text/html;charset=iso-8859-1"/>
head>
body>
divclass="outerBorder">
divclass="header">
divclass="banner">ApplicationNamediv>
divclass="subheader">
div>
ahref="mailto:feedback@youraddress">Feedbacka>|
ahref="#">SiteMapa>|
ahref="#">Homea>
div>
div><!--</span><span style="COLOR: #000000">sub</span><span style="COLOR: #000000">-</span><span style="COLOR: #000000">header</span><span style="COLOR: #000000">-->
div><!--</span><span style="COLOR: #000000">header</span><span style="COLOR: #000000">-->
divclass="main">
divclass="leftSidebar">
SidebarContentHere
a:widgetname="yahoo.calendar"/>
divid="selected_date">div>
script>
functionselectCallBack(_req)...{
vartmp=_req.responseText;
varobj=eval("("+tmp+")");
jmaki.log("tmp"+obj);
jmaki.publish("/table/topic/clear",...{});
jmaki.publish("/table/topic/addRows",obj);
}
functioncalendarListener(item)...{
vartargetDiv=document.getElementById("selected_date");
varselectedDateStr=item.value.getFullYear()
+"/"+(item.value.getMonth()+1)
+"/"+item.value.getDate();
targetDiv.innerHTML=selectedDateStr;
varbackEndUrl="BlogServlet?date="+selectedDateStr;
jmaki.doAjax(...{method:"POST",url:backEndUrl,callback:selectCallBack});
}
jmaki.subscribe("/yahoo/calendar/onSelect",calendarListener);
script>
div><!--</span><span style="COLOR: #000000">leftSidebar</span><span style="COLOR: #000000">-->
divclass="content"style="height:400px">
MainContentArea
a:widgetname="yahoo.dataTable"subscribe="/table/topic"
value="{columns:[
...{label:'PostDate',id:'postdate'},
...{label:'Title',id:'title'},
...{label:'Author',id:'author'}
],
rows:[]
}"
/>
div><!--</span><span style="COLOR: #000000">content</span><span style="COLOR: #000000">-->
div><!--</span><span style="COLOR: #000000">main</span><span style="COLOR: #000000">-->
div><!--</span><span style="COLOR: #000000">outerborder</span><span style="COLOR: #000000">-->
body>
html>
下一个"配置Servlet部署"窗口不做修改, 点击”完成”
throwsServletException,IOException...{
String[][]blogList=...{
...{"2007/09/07","NetBeansNewandCool","TimBoudreau"},
...{"2007/09/07","NetBeansMobility","AdaLi"},
...{"2007/09/07","CreatingWeb2.0RichInternetApplications","MichaelLi"},
...{"2007/09/08","AJAXandJSF","AdaLi"},
...{"2007/09/09","RubyonRailsintheEnterprise","LiangYe"},
...{"2007/09/09","BeansBindingandtheSwingApplicationFramework","JoeyShen"}
};
StringdateParam=request.getParameter("date");
SimpleDateFormatsdf=newSimpleDateFormat("yyyy/MM/dd");
booleanlistAll=false;
Datedate=null;
if(dateParam==null||"".equals(dateParam))...{
date=Calendar.getInstance().getTime();
listAll=true;
}else...{
try...{
date=sdf.parse(dateParam);
}catch(ParseExceptionex)...{
ex.printStackTrace();
}
}
StringdateStr=sdf.format(date);
response.setContentType("text/html;charset=UTF-8");
PrintWriterout=response.getWriter();
out.println("[");
booleanfirst=true;
for(inti=0;iblogList.length;i++)...{
String[]blogItem=blogList[i];
if(listAll||blogItem[0].equals(dateStr))...{//Datematch
if(!first)...{
out.println(",");
}
out.println("{");
out.println("postdate:'"+blogItem[0]+"',");
out.println("title:'"+blogItem[1]+"',");
out.println("author:'"+blogItem[2]+"'");
out.println("}");
first=false;
}//Endif
}//EndiblogListloop
out.println("]");//endrows
out.flush();
out.close();
}
SidebarContentHere
a:widgetname="yahoo.calendar"/>
divid="selected_date">div>
script>...
functionselectCallBack(_req)...{
vartmp=_req.responseText;
varobj=eval("("+tmp+")");
jmaki.log("tmp"+obj);
jmaki.publish("/table/topic/clear",...{});
jmaki.publish("/table/topic/addRows",obj);
}
functioncalendarListener(item)...{
vartargetDiv=document.getElementById("selected_date");
varselectedDateStr=item.value.getFullYear()
+"/"+(item.value.getMonth()+1)
+"/"+item.value.getDate();
targetDiv.innerHTML=selectedDateStr;
varbackEndUrl="BlogServlet?date="+selectedDateStr;
jmaki.doAjax(...{method:"POST",url:backEndUrl,callback:selectCallBack});
}
jmaki.subscribe("/yahoo/calendar/onSelect",calendarListener);
script>
div><!--</span><span style="COLOR: #008000">leftSidebar</span><span style="COLOR: #008000">-->
value="{columns:[
{label:'PostDate',id:'postdate'},
{label:'Title',id:'title'},
{label:'Author',id:'author'}
],
rows:[]
}"
/>
DOCTYPEhtmlPUBLIC"-//W3C//DTDXHTML1.0Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
html>
head>
linkrel="stylesheet"href="jmaki-standard.css"type="text/css">link>
title>PageTitletitle>
metahttp-equiv="Content-Type"content="text/html;charset=iso-8859-1"/>
head>
body>
divclass="outerBorder">
divclass="header">
divclass="banner">ApplicationNamediv>
divclass="subheader">
div>
ahref="mailto:feedback@youraddress">Feedbacka>|
ahref="#">SiteMapa>|
ahref="#">Homea>
div>
div><!--</span><span style="COLOR: #000000">sub</span><span style="COLOR: #000000">-</span><span style="COLOR: #000000">header</span><span style="COLOR: #000000">-->
div><!--</span><span style="COLOR: #000000">header</span><span style="COLOR: #000000">-->
divclass="main">
divclass="leftSidebar">
SidebarContentHere
a:widgetname="yahoo.calendar"/>
divid="selected_date">div>
script>
functionselectCallBack(_req)...{
vartmp=_req.responseText;
varobj=eval("("+tmp+")");
jmaki.log("tmp"+obj);
jmaki.publish("/table/topic/clear",...{});
jmaki.publish("/table/topic/addRows",obj);
}
functioncalendarListener(item)...{
vartargetDiv=document.getElementById("selected_date");
varselectedDateStr=item.value.getFullYear()
+"/"+(item.value.getMonth()+1)
+"/"+item.value.getDate();
targetDiv.innerHTML=selectedDateStr;
varbackEndUrl="BlogServlet?date="+selectedDateStr;
jmaki.doAjax(...{method:"POST",url:backEndUrl,callback:selectCallBack});
}
jmaki.subscribe("/yahoo/calendar/onSelect",calendarListener);
script>
div><!--</span><span style="COLOR: #000000">leftSidebar</span><span style="COLOR: #000000">-->
divclass="content"style="height:400px">
MainContentArea
a:widgetname="yahoo.dataTable"subscribe="/table/topic"
value="{columns:[
...{label:'PostDate',id:'postdate'},
...{label:'Title',id:'title'},
...{label:'Author',id:'author'}
],
rows:[]
}"
/>
div><!--</span><span style="COLOR: #000000">content</span><span style="COLOR: #000000">-->
div><!--</span><span style="COLOR: #000000">main</span><span style="COLOR: #000000">-->
div><!--</span><span style="COLOR: #000000">outerborder</span><span style="COLOR: #000000">-->
body>
html>
下一个"配置Servlet部署"窗口不做修改, 点击”完成”
throwsServletException,IOException...{
String[][]blogList=...{
...{"2007/09/07","NetBeansNewandCool","TimBoudreau"},
...{"2007/09/07","NetBeansMobility","AdaLi"},
...{"2007/09/07","CreatingWeb2.0RichInternetApplications","MichaelLi"},
...{"2007/09/08","AJAXandJSF","AdaLi"},
...{"2007/09/09","RubyonRailsintheEnterprise","LiangYe"},
...{"2007/09/09","BeansBindingandtheSwingApplicationFramework","JoeyShen"}
};
StringdateParam=request.getParameter("date");
SimpleDateFormatsdf=newSimpleDateFormat("yyyy/MM/dd");
booleanlistAll=false;
Datedate=null;
if(dateParam==null||"".equals(dateParam))...{
date=Calendar.getInstance().getTime();
listAll=true;
}else...{
try...{
date=sdf.parse(dateParam);
}catch(ParseExceptionex)...{
ex.printStackTrace();
}
}
StringdateStr=sdf.format(date);
response.setContentType("text/html;charset=UTF-8");
PrintWriterout=response.getWriter();
out.println("[");
booleanfirst=true;
for(inti=0;iblogList.length;i++)...{
String[]blogItem=blogList[i];
if(listAll||blogItem[0].equals(dateStr))...{//Datematch
if(!first)...{
out.println(",");
}
out.println("{");
out.println("postdate:'"+blogItem[0]+"',");
out.println("title:'"+blogItem[1]+"',");
out.println("author:'"+blogItem[2]+"'");
out.println("}");
first=false;
}//Endif
}//EndiblogListloop
out.println("]");//endrows
out.flush();
out.close();
}
SidebarContentHere
a:widgetname="yahoo.calendar"/>
divid="selected_date">div>
script>...
functionselectCallBack(_req)...{
vartmp=_req.responseText;
varobj=eval("("+tmp+")");
jmaki.log("tmp"+obj);
jmaki.publish("/table/topic/clear",...{});
jmaki.publish("/table/topic/addRows",obj);
}
functioncalendarListener(item)...{
vartargetDiv=document.getElementById("selected_date");
varselectedDateStr=item.value.getFullYear()
+"/"+(item.value.getMonth()+1)
+"/"+item.value.getDate();
targetDiv.innerHTML=selectedDateStr;
varbackEndUrl="BlogServlet?date="+selectedDateStr;
jmaki.doAjax(...{method:"POST",url:backEndUrl,callback:selectCallBack});
}
jmaki.subscribe("/yahoo/calendar/onSelect",calendarListener);
script>
div><!--</span><span style="COLOR: #008000">leftSidebar</span><span style="COLOR: #008000">-->
value="{columns:[
{label:'PostDate',id:'postdate'},
{label:'Title',id:'title'},
{label:'Author',id:'author'}
],
rows:[]
}"
/>
DOCTYPEhtmlPUBLIC"-//W3C//DTDXHTML1.0Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
html>
head>
linkrel="stylesheet"href="jmaki-standard.css"type="text/css">link>
title>PageTitletitle>
metahttp-equiv="Content-Type"content="text/html;charset=iso-8859-1"/>
head>
body>
divclass="outerBorder">
divclass="header">
divclass="banner">ApplicationNamediv>
divclass="subheader">
div>
ahref="mailto:feedback@youraddress">Feedbacka>|
ahref="#">SiteMapa>|
ahref="#">Homea>
div>
div><!--</span><span style="COLOR: #000000">sub</span><span style="COLOR: #000000">-</span><span style="COLOR: #000000">header</span><span style="COLOR: #000000">-->
div><!--</span><span style="COLOR: #000000">header</span><span style="COLOR: #000000">-->
divclass="main">
divclass="leftSidebar">
SidebarContentHere
a:widgetname="yahoo.calendar"/>
divid="selected_date">div>
script>
functionselectCallBack(_req)...{
vartmp=_req.responseText;
varobj=eval("("+tmp+")");
jmaki.log("tmp"+obj);
jmaki.publish("/table/topic/clear",...{});
jmaki.publish("/table/topic/addRows",obj);
}
functioncalendarListener(item)...{
vartargetDiv=document.getElementById("selected_date");
varselectedDateStr=item.value.getFullYear()
+"/"+(item.value.getMonth()+1)
+"/"+item.value.getDate();
targetDiv.innerHTML=selectedDateStr;
varbackEndUrl="BlogServlet?date="+selectedDateStr;
jmaki.doAjax(...{method:"POST",url:backEndUrl,callback:selectCallBack});
}
jmaki.subscribe("/yahoo/calendar/onSelect",calendarListener);
script>
div><!--</span><span style="COLOR: #000000">leftSidebar</span><span style="COLOR: #000000">-->
divclass="content"style="height:400px">
MainContentArea
a:widgetname="yahoo.dataTable"subscribe="/table/topic"
value="{columns:[
...{label:'PostDate',id:'postdate'},
...{label:'Title',id:'title'},
...{label:'Author',id:'author'}
],
rows:[]
}"
/>
div><!--</span><span style="COLOR: #000000">content</span><span style="COLOR: #000000">-->
div><!--</span><span style="COLOR: #000000">main</span><span style="COLOR: #000000">-->
div><!--</span><span style="COLOR: #000000">outerborder</span><span style="COLOR: #000000">-->
body>
html>
下一个"配置Servlet部署"窗口不做修改, 点击”完成”
throwsServletException,IOException...{
String[][]blogList=...{
...{"2007/09/07","NetBeansNewandCool","TimBoudreau"},
...{"2007/09/07","NetBeansMobility","AdaLi"},
...{"2007/09/07","CreatingWeb2.0RichInternetApplications","MichaelLi"},
...{"2007/09/08","AJAXandJSF","AdaLi"},
...{"2007/09/09","RubyonRailsintheEnterprise","LiangYe"},
...{"2007/09/09","BeansBindingandtheSwingApplicationFramework","JoeyShen"}
};
StringdateParam=request.getParameter("date");
SimpleDateFormatsdf=newSimpleDateFormat("yyyy/MM/dd");
booleanlistAll=false;
Datedate=null;
if(dateParam==null||"".equals(dateParam))...{
date=Calendar.getInstance().getTime();
listAll=true;
}else...{
try...{
date=sdf.parse(dateParam);
}catch(ParseExceptionex)...{
ex.printStackTrace();
}
}
StringdateStr=sdf.format(date);
response.setContentType("text/html;charset=UTF-8");
PrintWriterout=response.getWriter();
out.println("[");
booleanfirst=true;
for(inti=0;iblogList.length;i++)...{
String[]blogItem=blogList[i];
if(listAll||blogItem[0].equals(dateStr))...{//Datematch
if(!first)...{
out.println(",");
}
out.println("{");
out.println("postdate:'"+blogItem[0]+"',");
out.println("title:'"+blogItem[1]+"',");
out.println("author:'"+blogItem[2]+"'");
out.println("}");
first=false;
}//Endif
}//EndiblogListloop
out.println("]");//endrows
out.flush();
out.close();
}
SidebarContentHere
a:widgetname="yahoo.calendar"/>
divid="selected_date">div>
script>...
functionselectCallBack(_req)...{
vartmp=_req.responseText;
varobj=eval("("+tmp+")");
jmaki.log("tmp"+obj);
jmaki.publish("/table/topic/clear",...{});
jmaki.publish("/table/topic/addRows",obj);
}
functioncalendarListener(item)...{
vartargetDiv=document.getElementById("selected_date");
varselectedDateStr=item.value.getFullYear()
+"/"+(item.value.getMonth()+1)
+"/"+item.value.getDate();
targetDiv.innerHTML=selectedDateStr;
varbackEndUrl="BlogServlet?date="+selectedDateStr;
jmaki.doAjax(...{method:"POST",url:backEndUrl,callback:selectCallBack});
}
jmaki.subscribe("/yahoo/calendar/onSelect",calendarListener);
script>
div><!--</span><span style="COLOR: #008000">leftSidebar</span><span style="COLOR: #008000">-->
value="{columns:[
{label:'PostDate',id:'postdate'},
{label:'Title',id:'title'},
{label:'Author',id:'author'}
],
rows:[]
}"
/>
DOCTYPEhtmlPUBLIC"-//W3C//DTDXHTML1.0Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
html>
head>
linkrel="stylesheet"href="jmaki-standard.css"type="text/css">link>
title>PageTitletitle>
metahttp-equiv="Content-Type"content="text/html;charset=iso-8859-1"/>
head>
body>
divclass="outerBorder">
divclass="header">
divclass="banner">ApplicationNamediv>
divclass="subheader">
div>
ahref="mailto:feedback@youraddress">Feedbacka>|
ahref="#">SiteMapa>|
ahref="#">Homea>
div>
div><!--</span><span style="COLOR: #000000">sub</span><span style="COLOR: #000000">-</span><span style="COLOR: #000000">header</span><span style="COLOR: #000000">-->
div><!--</span><span style="COLOR: #000000">header</span><span style="COLOR: #000000">-->
divclass="main">
divclass="leftSidebar">
SidebarContentHere
a:widgetname="yahoo.calendar"/>
divid="selected_date">div>
script>
functionselectCallBack(_req)...{
vartmp=_req.responseText;
varobj=eval("("+tmp+")");
jmaki.log("tmp"+obj);
jmaki.publish("/table/topic/clear",...{});
jmaki.publish("/table/topic/addRows",obj);
}
functioncalendarListener(item)...{
vartargetDiv=document.getElementById("selected_date");
varselectedDateStr=item.value.getFullYear()
+"/"+(item.value.getMonth()+1)
+"/"+item.value.getDate();
targetDiv.innerHTML=selectedDateStr;
varbackEndUrl="BlogServlet?date="+selectedDateStr;
jmaki.doAjax(...{method:"POST",url:backEndUrl,callback:selectCallBack});
}
jmaki.subscribe("/yahoo/calendar/onSelect",calendarListener);
script>
div><!--</span><span style="COLOR: #000000">leftSidebar</span><span style="COLOR: #000000">-->
divclass="content"style="height:400px">
MainContentArea
a:widgetname="yahoo.dataTable"subscribe="/table/topic"
value="{columns:[
...{label:'PostDate',id:'postdate'},
...{label:'Title',id:'title'},
...{label:'Author',id:'author'}
],
rows:[]
}"
/>
div><!--</span><span style="COLOR: #000000">content</span><span style="COLOR: #000000">-->
div><!--</span><span style="COLOR: #000000">main</span><span style="COLOR: #000000">-->
div><!--</span><span style="COLOR: #000000">outerborder</span><span style="COLOR: #000000">-->
body>
html>
下一个"配置Servlet部署"窗口不做修改, 点击”完成”
throwsServletException,IOException...{
String[][]blogList=...{
...{"2007/09/07","NetBeansNewandCool","TimBoudreau"},
...{"2007/09/07","NetBeansMobility","AdaLi"},
...{"2007/09/07","CreatingWeb2.0RichInternetApplications","MichaelLi"},
...{"2007/09/08","AJAXandJSF","AdaLi"},
...{"2007/09/09","RubyonRailsintheEnterprise","LiangYe"},
...{"2007/09/09","BeansBindingandtheSwingApplicationFramework","JoeyShen"}
};
StringdateParam=request.getParameter("date");
SimpleDateFormatsdf=newSimpleDateFormat("yyyy/MM/dd");
booleanlistAll=false;
Datedate=null;
if(dateParam==null||"".equals(dateParam))...{
date=Calendar.getInstance().getTime();
listAll=true;
}else...{
try...{
date=sdf.parse(dateParam);
}catch(ParseExceptionex)...{
ex.printStackTrace();
}
}
StringdateStr=sdf.format(date);
response.setContentType("text/html;charset=UTF-8");
PrintWriterout=response.getWriter();
out.println("[");
booleanfirst=true;
for(inti=0;iblogList.length;i++)...{
String[]blogItem=blogList[i];
if(listAll||blogItem[0].equals(dateStr))...{//Datematch
if(!first)...{
out.println(",");
}
out.println("{");
out.println("postdate:'"+blogItem[0]+"',");
out.println("title:'"+blogItem[1]+"',");
out.println("author:'"+blogItem[2]+"'");
out.println("}");
first=false;
}//Endif
}//EndiblogListloop
out.println("]");//endrows
out.flush();
out.close();
}
SidebarContentHere
a:widgetname="yahoo.calendar"/>
divid="selected_date">div>
script>...
functionselectCallBack(_req)...{
vartmp=_req.responseText;
varobj=eval("("+tmp+")");
jmaki.log("tmp"+obj);
jmaki.publish("/table/topic/clear",...{});
jmaki.publish("/table/topic/addRows",obj);
}
functioncalendarListener(item)...{
vartargetDiv=document.getElementById("selected_date");
varselectedDateStr=item.value.getFullYear()
+"/"+(item.value.getMonth()+1)
+"/"+item.value.getDate();
targetDiv.innerHTML=selectedDateStr;
varbackEndUrl="BlogServlet?date="+selectedDateStr;
jmaki.doAjax(...{method:"POST",url:backEndUrl,callback:selectCallBack});
}
jmaki.subscribe("/yahoo/calendar/onSelect",calendarListener);
script>
div><!--</span><span style="COLOR: #008000">leftSidebar</span><span style="COLOR: #008000">-->
value="{columns:[
{label:'PostDate',id:'postdate'},
{label:'Title',id:'title'},
{label:'Author',id:'author'}
],
rows:[]
}"
/>
DOCTYPEhtmlPUBLIC"-//W3C//DTDXHTML1.0Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
html>
head>
linkrel="stylesheet"href="jmaki-standard.css"type="text/css">link>
title>PageTitletitle>
metahttp-equiv="Content-Type"content="text/html;charset=iso-8859-1"/>
head>
body>
divclass="outerBorder">
divclass="header">
divclass="banner">ApplicationNamediv>
divclass="subheader">
div>
ahref="mailto:feedback@youraddress">Feedbacka>|
ahref="#">SiteMapa>|
ahref="#">Homea>
div>
div><!--</span><span style="COLOR: #000000">sub</span><span style="COLOR: #000000">-</span><span style="COLOR: #000000">header</span><span style="COLOR: #000000">-->
div><!--</span><span style="COLOR: #000000">header</span><span style="COLOR: #000000">-->
divclass="main">
divclass="leftSidebar">
SidebarContentHere
a:widgetname="yahoo.calendar"/>
divid="selected_date">div>
script>
functionselectCallBack(_req)...{
vartmp=_req.responseText;
varobj=eval("("+tmp+")");
jmaki.log("tmp"+obj);
jmaki.publish("/table/topic/clear",...{});
jmaki.publish("/table/topic/addRows",obj);
}
functioncalendarListener(item)...{
vartargetDiv=document.getElementById("selected_date");
varselectedDateStr=item.value.getFullYear()
+"/"+(item.value.getMonth()+1)
+"/"+item.value.getDate();
targetDiv.innerHTML=selectedDateStr;
varbackEndUrl="BlogServlet?date="+selectedDateStr;
jmaki.doAjax(...{method:"POST",url:backEndUrl,callback:selectCallBack});
}
jmaki.subscribe("/yahoo/calendar/onSelect",calendarListener);
script>
div><!--</span><span style="COLOR: #000000">leftSidebar</span><span style="COLOR: #000000">-->
divclass="content"style="height:400px">
MainContentArea
a:widgetname="yahoo.dataTable"subscribe="/table/topic"
value="{columns:[
...{label:'PostDate',id:'postdate'},
...{label:'Title',id:'title'},
...{label:'Author',id:'author'}
],
rows:[]
}"
/>
div><!--</span><span style="COLOR: #000000">content</span><span style="COLOR: #000000">-->
div><!--</span><span style="COLOR: #000000">main</span><span style="COLOR: #000000">-->
div><!--</span><span style="COLOR: #000000">outerborder</span><span style="COLOR: #000000">-->
body>
html>
下一个"配置Servlet部署"窗口不做修改, 点击”完成”
throwsServletException,IOException...{
String[][]blogList=...{
...{"2007/09/07","NetBeansNewandCool","TimBoudreau"},
...{"2007/09/07","NetBeansMobility","AdaLi"},
...{"2007/09/07","CreatingWeb2.0RichInternetApplications","MichaelLi"},
...{"2007/09/08","AJAXandJSF","AdaLi"},
...{"2007/09/09","RubyonRailsintheEnterprise","LiangYe"},
...{"2007/09/09","BeansBindingandtheSwingApplicationFramework","JoeyShen"}
};
StringdateParam=request.getParameter("date");
SimpleDateFormatsdf=newSimpleDateFormat("yyyy/MM/dd");
booleanlistAll=false;
Datedate=null;
if(dateParam==null||"".equals(dateParam))...{
date=Calendar.getInstance().getTime();
listAll=true;
}else...{
try...{
date=sdf.parse(dateParam);
}catch(ParseExceptionex)...{
ex.printStackTrace();
}
}
StringdateStr=sdf.format(date);
response.setContentType("text/html;charset=UTF-8");
PrintWriterout=response.getWriter();
out.println("[");
booleanfirst=true;
for(inti=0;iblogList.length;i++)...{
String[]blogItem=blogList[i];
if(listAll||blogItem[0].equals(dateStr))...{//Datematch
if(!first)...{
out.println(",");
}
out.println("{");
out.println("postdate:'"+blogItem[0]+"',");
out.println("title:'"+blogItem[1]+"',");
out.println("author:'"+blogItem[2]+"'");
out.println("}");
first=false;
}//Endif
}//EndiblogListloop
out.println("]");//endrows
out.flush();
out.close();
}
SidebarContentHere
a:widgetname="yahoo.calendar"/>
divid="selected_date">div>
script>...
functionselectCallBack(_req)...{
vartmp=_req.responseText;
varobj=eval("("+tmp+")");
jmaki.log("tmp"+obj);
jmaki.publish("/table/topic/clear",...{});
jmaki.publish("/table/topic/addRows",obj);
}
functioncalendarListener(item)...{
vartargetDiv=document.getElementById("selected_date");
varselectedDateStr=item.value.getFullYear()
+"/"+(item.value.getMonth()+1)
+"/"+item.value.getDate();
targetDiv.innerHTML=selectedDateStr;
varbackEndUrl="BlogServlet?date="+selectedDateStr;
jmaki.doAjax(...{method:"POST",url:backEndUrl,callback:selectCallBack});
}
jmaki.subscribe("/yahoo/calendar/onSelect",calendarListener);
script>
div><!--</span><span style="COLOR: #008000">leftSidebar</span><span style="COLOR: #008000">-->
value="{columns:[
{label:'PostDate',id:'postdate'},
{label:'Title',id:'title'},
{label:'Author',id:'author'}
],
rows:[]
}"
/>
DOCTYPEhtmlPUBLIC"-//W3C//DTDXHTML1.0Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
html>
head>
linkrel="stylesheet"href="jmaki-standard.css"type="text/css">link>
title>PageTitletitle>
metahttp-equiv="Content-Type"content="text/html;charset=iso-8859-1"/>
head>
body>
divclass="outerBorder">
divclass="header">
divclass="banner">ApplicationNamediv>
divclass="subheader">
div>
ahref="mailto:feedback@youraddress">Feedbacka>|
ahref="#">SiteMapa>|
ahref="#">Homea>
div>
div><!--</span><span style="COLOR: #000000">sub</span><span style="COLOR: #000000">-</span><span style="COLOR: #000000">header</span><span style="COLOR: #000000">-->
div><!--</span><span style="COLOR: #000000">header</span><span style="COLOR: #000000">-->
divclass="main">
divclass="leftSidebar">
SidebarContentHere
a:widgetname="yahoo.calendar"/>
divid="selected_date">div>
script>
functionselectCallBack(_req)...{
vartmp=_req.responseText;
varobj=eval("("+tmp+")");
jmaki.log("tmp"+obj);
jmaki.publish("/table/topic/clear",...{});
jmaki.publish("/table/topic/addRows",obj);
}
functioncalendarListener(item)...{
vartargetDiv=document.getElementById("selected_date");
varselectedDateStr=item.value.getFullYear()
+"/"+(item.value.getMonth()+1)
+"/"+item.value.getDate();
targetDiv.innerHTML=selectedDateStr;
varbackEndUrl="BlogServlet?date="+selectedDateStr;
jmaki.doAjax(...{method:"POST",url:backEndUrl,callback:selectCallBack});
}
jmaki.subscribe("/yahoo/calendar/onSelect",calendarListener);
script>
div><!--</span><span style="COLOR: #000000">leftSidebar</span><span style="COLOR: #000000">-->
divclass="content"style="height:400px">
MainContentArea
a:widgetname="yahoo.dataTable"subscribe="/table/topic"
value="{columns:[
...{label:'PostDate',id:'postdate'},
...{label:'Title',id:'title'},
...{label:'Author',id:'author'}
],
rows:[]
}"
/>
div><!--</span><span style="COLOR: #000000">content</span><span style="COLOR: #000000">-->
div><!--</span><span style="COLOR: #000000">main</span><span style="COLOR: #000000">-->
div><!--</span><span style="COLOR: #000000">outerborder</span><span style="COLOR: #000000">-->
body>
html>
下一个"配置Servlet部署"窗口不做修改, 点击”完成”
throwsServletException,IOException...{
String[][]blogList=...{
...{"2007/09/07","NetBeansNewandCool","TimBoudreau"},
...{"2007/09/07","NetBeansMobility","AdaLi"},
...{"2007/09/07","CreatingWeb2.0RichInternetApplications","MichaelLi"},
...{"2007/09/08","AJAXandJSF","AdaLi"},
...{"2007/09/09","RubyonRailsintheEnterprise","LiangYe"},
...{"2007/09/09","BeansBindingandtheSwingApplicationFramework","JoeyShen"}
};
StringdateParam=request.getParameter("date");
SimpleDateFormatsdf=newSimpleDateFormat("yyyy/MM/dd");
booleanlistAll=false;
Datedate=null;
if(dateParam==null||"".equals(dateParam))...{
date=Calendar.getInstance().getTime();
listAll=true;
}else...{
try...{
date=sdf.parse(dateParam);
}catch(ParseExceptionex)...{
ex.printStackTrace();
}
}
StringdateStr=sdf.format(date);
response.setContentType("text/html;charset=UTF-8");
PrintWriterout=response.getWriter();
out.println("[");
booleanfirst=true;
for(inti=0;iblogList.length;i++)...{
String[]blogItem=blogList[i];
if(listAll||blogItem[0].equals(dateStr))...{//Datematch
if(!first)...{
out.println(",");
}
out.println("{");
out.println("postdate:'"+blogItem[0]+"',");
out.println("title:'"+blogItem[1]+"',");
out.println("author:'"+blogItem[2]+"'");
out.println("}");
first=false;
}//Endif
}//EndiblogListloop
out.println("]");//endrows
out.flush();
out.close();
}
阅读排行
评论排行
推荐文章
最新评论
相关推荐
OAuth 实现框架 Agorava Agorava 是一个实现了 OAuth 1.0a 和 OAuth 2.0 的框架,提供了简单的方式通过社交媒体进行身份认证的功能。 Eclipse的JavaScript插件 JSEditor JSEditor 是 Eclipse 下编辑 JavaScript ...
OAuth 实现框架 Agorava Agorava 是一个实现了 OAuth 1.0a 和 OAuth 2.0 的框架,提供了简单的方式通过社交媒体进行身份认证的功能。 Eclipse的JavaScript插件 JSEditor JSEditor 是 Eclipse 下编辑 JavaScript ...
2个目标文件,FTP的目标是:(1)提高文件的共享性(计算机程序和/或数据),(2)鼓励间接地(通过程序)使用远程计算机,(3)保护用户因主机之间的文件存储系统导致的变化,(4)为了可靠和高效地传输,虽然用户...
OAuth 实现框架 Agorava Agorava 是一个实现了 OAuth 1.0a 和 OAuth 2.0 的框架,提供了简单的方式通过社交媒体进行身份认证的功能。 Eclipse的JavaScript插件 JSEditor JSEditor 是 Eclipse 下编辑 JavaScript ...
OAuth 实现框架 Agorava Agorava 是一个实现了 OAuth 1.0a 和 OAuth 2.0 的框架,提供了简单的方式通过社交媒体进行身份认证的功能。 Eclipse的JavaScript插件 JSEditor JSEditor 是 Eclipse 下编辑 JavaScript ...
OAuth 实现框架 Agorava Agorava 是一个实现了 OAuth 1.0a 和 OAuth 2.0 的框架,提供了简单的方式通过社交媒体进行身份认证的功能。 Eclipse的JavaScript插件 JSEditor JSEditor 是 Eclipse 下编辑 JavaScript ...
OAuth 实现框架 Agorava Agorava 是一个实现了 OAuth 1.0a 和 OAuth 2.0 的框架,提供了简单的方式通过社交媒体进行身份认证的功能。 Eclipse的JavaScript插件 JSEditor JSEditor 是 Eclipse 下编辑 JavaScript ...
OAuth 实现框架 Agorava Agorava 是一个实现了 OAuth 1.0a 和 OAuth 2.0 的框架,提供了简单的方式通过社交媒体进行身份认证的功能。 Eclipse的JavaScript插件 JSEditor JSEditor 是 Eclipse 下编辑 JavaScript ...
OAuth 实现框架 Agorava Agorava 是一个实现了 OAuth 1.0a 和 OAuth 2.0 的框架,提供了简单的方式通过社交媒体进行身份认证的功能。 Eclipse的JavaScript插件 JSEditor JSEditor 是 Eclipse 下编辑 JavaScript ...
OAuth 实现框架 Agorava Agorava 是一个实现了 OAuth 1.0a 和 OAuth 2.0 的框架,提供了简单的方式通过社交媒体进行身份认证的功能。 Eclipse的JavaScript插件 JSEditor JSEditor 是 Eclipse 下编辑 JavaScript ...
OAuth 实现框架 Agorava Agorava 是一个实现了 OAuth 1.0a 和 OAuth 2.0 的框架,提供了简单的方式通过社交媒体进行身份认证的功能。 Eclipse的JavaScript插件 JSEditor JSEditor 是 Eclipse 下编辑 JavaScript ...
OAuth 实现框架 Agorava Agorava 是一个实现了 OAuth 1.0a 和 OAuth 2.0 的框架,提供了简单的方式通过社交媒体进行身份认证的功能。 Eclipse的JavaScript插件 JSEditor JSEditor 是 Eclipse 下编辑 JavaScript ...
OAuth 实现框架 Agorava Agorava 是一个实现了 OAuth 1.0a 和 OAuth 2.0 的框架,提供了简单的方式通过社交媒体进行身份认证的功能。 Eclipse的JavaScript插件 JSEditor JSEditor 是 Eclipse 下编辑 JavaScript ...
OAuth 实现框架 Agorava Agorava 是一个实现了 OAuth 1.0a 和 OAuth 2.0 的框架,提供了简单的方式通过社交媒体进行身份认证的功能。 Eclipse的JavaScript插件 JSEditor JSEditor 是 Eclipse 下编辑 JavaScript ...
5.10 日历控件(Calendar) 5.10.1 日历控件的样式 5.10.2 日历控件的事件 5.11 广告控件(AdRotator) 5.12 文件上传控件(FileUpload) 5.13 视图控件(MultiView 和View) 5.14 表控件(Table) 5.15 向导控件...
2个目标文件,FTP的目标是:(1)提高文件的共享性(计算机程序和/或数据),(2)鼓励间接地(通过程序)使用远程计算机,(3)保护用户因主机之间的文件存储系统导致的变化,(4)为了可靠和高效地传输,虽然用户...
js的日历时间控件 if(typeof Control=="undefined"){Control={}}Control.DatePicker=Class.create({initialize:function(element,options){this.element=$(element);if(dp=this.element.retrieve("datepicker")){dp....
5.10 日历控件(Calendar) 5.10.1 日历控件的样式 5.10.2 日历控件的事件 5.11 广告控件(AdRotator) 5.12 文件上传控件(FileUpload) 5.13 视图控件(MultiView和View) 5.14 表控件(Table) 5.15 向导控件...
5.10 日历控件(Calendar) 5.10.1 日历控件的样式 5.10.2 日历控件的事件 5.11 广告控件(AdRotator) 5.12 文件上传控件(FileUpload) 5.13 视图控件(MultiView和View) 5.14 表控件(Table) 5.15 向导控件...