资源简介

FullCalendar是一款基于jQuery的日历插件,适用于各种日程安排、工作计划等场景,您可以很方便的查看查看待办事项,标记重要事项以及绑定点击和拖动事件,能快速的整合到您的项目中,本文将简单介绍FullCalendar的使用。使用语言Java, 数据库MySql。

资源截图

代码片段和文件信息

package com.cetc.roman.fullcalendar.action;

import java.io.IOException;
import java.io.PrintWriter;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.cetc.roman.fullcalendar.dao.CalendarDao;
import com.cetc.roman.fullcalendar.domain.Calendar;
import com.cetc.roman.fullcalendar.util.DateUtil;

@WebServlet(“/EventDoServlet“)
public class EventDoServlet extends HttpServlet {
private static final long serialVersionUID = 1L;
       
    public EventDoServlet() {
        super();
    }

protected void doGet(HttpServletRequest request HttpServletResponse response) throws ServletException IOException {
doPost(request response);
}

protected void doPost(HttpServletRequest request HttpServletResponse response) throws ServletException IOException {
response.setContentType(“text/html“);
PrintWriter out = response.getWriter();
String action = request.getParameter(“action“);
if(“add“.equals(action)){
String events = request.getParameter(“event“);//事件内容
String isallday = request.getParameter(“isallday“);//是否是全天事件
String isend = request.getParameter(“isend“);//是否有结束时间
String startdate = request.getParameter(“startdate“);
String enddate = request.getParameter(“enddate“);
String s_time = request.getParameter(“s_hour“) + “:“ + request.getParameter(“s_minute“) + “:00“;
String e_time = request.getParameter(“e_hour“) + “:“ + request.getParameter(“e_minute“) + “:00“;

String start = ““;
String end = ““;
if(“1“.equals(isallday) && “1“.equals(isend)){
start = startdate;
end = enddate;
}else if(“1“.equals(isallday) && isend == null){
start = startdate;
}else if(isallday == null && “1“.equals(isend)){
start = startdate + “ “ + s_time;
end = enddate + “ “ + e_time;
isallday = “0“;
}else {
start = startdate + “ “ + s_time;
isallday = “0“;
}

String[] colors = {“#360““#f30““#06c“};
int index = (int)(Math.random()*colors.length);
Calendar calendar = new Calendar();
calendar.settitle(events);
calendar.setStart(start);
calendar.setEnd(end);
calendar.setAllDay(Integer.parseInt(isallday));
calendar.setColor(colors[index]);
boolean b = new CalendarDao().add(calendar);
if(b){
out.print(“1“);
}else {
out.print(“写入失败!“);
}
}else if(“edit“.equals(action)) {
Integer id =  Integer.parseInt(request.getParameter(“id“));
String events = request.getParameter(“event“);//事件内容
String isallday = request.getParameter(“isallday“);//是否是全天事件
String isend = request.getParameter(“isend“);//是否有结束时间
String startdate = request.getParameter(“startdate“);
String enddate = request.getParameter(“enddate“);
String s_time = request.getParameter(“s_hour“) + “:“ + request.getParameter(“s_minute“)

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件        802  2014-02-20 11:54  FullCalendar\fullcalendar.sql

     文件        841  2014-02-19 09:29  FullCalendar\fullCalendar4Java\.classpath

     文件       1050  2014-02-19 09:29  FullCalendar\fullCalendar4Java\.project

     文件        500  2014-02-19 09:29  FullCalendar\fullCalendar4Java\.settings\.jsdtscope

     文件        364  2014-02-19 09:29  FullCalendar\fullCalendar4Java\.settings\org.eclipse.jdt.core.prefs

     文件        502  2014-02-19 09:29  FullCalendar\fullCalendar4Java\.settings\org.eclipse.wst.common.component

     文件        345  2014-02-19 09:29  FullCalendar\fullCalendar4Java\.settings\org.eclipse.wst.common.project.facet.core.xml

     文件         49  2014-02-19 09:29  FullCalendar\fullCalendar4Java\.settings\org.eclipse.wst.jsdt.ui.superType.container

     文件          6  2014-02-19 09:29  FullCalendar\fullCalendar4Java\.settings\org.eclipse.wst.jsdt.ui.superType.name

     文件       6514  2014-02-20 11:38  FullCalendar\fullCalendar4Java\build\classes\com\cetc\roman\fullcalendar\action\EventDoServlet.class

     文件       1738  2014-02-20 08:46  FullCalendar\fullCalendar4Java\build\classes\com\cetc\roman\fullcalendar\action\JsonServlet.class

     文件       5534  2014-02-20 09:21  FullCalendar\fullCalendar4Java\build\classes\com\cetc\roman\fullcalendar\dao\CalendarDao.class

     文件       1556  2014-02-19 14:12  FullCalendar\fullCalendar4Java\build\classes\com\cetc\roman\fullcalendar\domain\Calendar.class

     文件       1160  2014-02-19 10:30  FullCalendar\fullCalendar4Java\build\classes\com\cetc\roman\fullcalendar\domain\JdbcConfig.class

     文件       1657  2014-02-19 10:37  FullCalendar\fullCalendar4Java\build\classes\com\cetc\roman\fullcalendar\filter\CharacterEncodingFilter.class

     文件       1738  2014-02-20 11:39  FullCalendar\fullCalendar4Java\build\classes\com\cetc\roman\fullcalendar\util\DateUtil.class

     文件       2799  2014-02-19 10:30  FullCalendar\fullCalendar4Java\build\classes\com\cetc\roman\fullcalendar\util\DbUtil.class

     文件       2217  2014-02-19 10:30  FullCalendar\fullCalendar4Java\build\classes\com\cetc\roman\fullcalendar\util\xmlConfigReader.class

     文件        251  2014-02-19 09:55  FullCalendar\fullCalendar4Java\build\classes\sys-config.xml

     文件       6924  2014-02-20 11:38  FullCalendar\fullCalendar4Java\src\com\cetc\roman\fullcalendar\action\EventDoServlet.java

     文件       1346  2014-02-20 08:46  FullCalendar\fullCalendar4Java\src\com\cetc\roman\fullcalendar\action\JsonServlet.java

     文件       4635  2014-02-20 09:21  FullCalendar\fullCalendar4Java\src\com\cetc\roman\fullcalendar\dao\CalendarDao.java

     文件       1026  2014-02-19 14:12  FullCalendar\fullCalendar4Java\src\com\cetc\roman\fullcalendar\domain\Calendar.java

     文件        790  2014-02-19 09:55  FullCalendar\fullCalendar4Java\src\com\cetc\roman\fullcalendar\domain\JdbcConfig.java

     文件       1192  2014-02-19 10:37  FullCalendar\fullCalendar4Java\src\com\cetc\roman\fullcalendar\filter\CharacterEncodingFilter.java

     文件       1296  2014-02-20 11:39  FullCalendar\fullCalendar4Java\src\com\cetc\roman\fullcalendar\util\DateUtil.java

     文件       2784  2014-02-19 09:55  FullCalendar\fullCalendar4Java\src\com\cetc\roman\fullcalendar\util\DbUtil.java

     文件       1679  2014-02-19 09:55  FullCalendar\fullCalendar4Java\src\com\cetc\roman\fullcalendar\util\xmlConfigReader.java

     文件        251  2014-02-19 09:55  FullCalendar\fullCalendar4Java\src\sys-config.xml

    ..A..H.      3791  2014-02-20 11:42  FullCalendar\fullCalendar4Java\WebRoot\.tmp_index.html.55945~

............此处省略92个文件信息

评论

共有 条评论