【问题标题】:Primefaces Schedule add an event on every week of a given time periodPrimefaces Schedule 在给定时间段的每周添加一个事件
【发布时间】:2014-06-08 13:58:10
【问题描述】:

我正在为我学校的实验室办公室建立一个在线时间表。我可以访问我的学校数据库,该数据库存储给定课程的日期和时间段(即:化学 101-MONDAY-10:00 至 13: 00)。

所以我需要在当前学年的每周加载包含课程名称、日期和时间(化学 101-MONDAY-10:00 到 13:00)的事件,然后将其显示在时间表。我能想到的唯一方法是计算当前学年的第一个星期一的日期,将该事件添加到时间表组件中,然后计算下周一的日期并将该事件添加到时间表组件中直到学期结束,但是看起来很麻烦而且没有必要。所以这是我的问题

无论如何我可以告诉primefaces在某个时间段(学术期间)每周的同一天加载课程(即“化学1010-MONDAY-10:00至13:00”)没有在我的 managedBean 上创建一个循环来计算每个类的单独日期???

我正在使用 Primefaces 3.5 和 STS(弹簧工具套件 3.4.0)

【问题讨论】:

    标签: java date jsf-2 primefaces schedule


    【解决方案1】:

    你为什么不试试调度作业,

        write a program which do the stuff with  current date
    suppose current date is 9 jun2 2014 which is Monday
        in window machine schedule a tast to run that program on every Monday with time,
        in linux create a crone job to run that program on every Monday with time,
        if you want to do this stuff OS independent that
        study Play Framework which will take care of schedule task and run the job on every Monday
        below the reference of Play
    

    enter link description here http://www.playframework.com/documentation/1.1/jobs

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-09-15
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2019-09-25
      • 2022-06-10
      相关资源
      最近更新 更多