我目前正在实施一个事件管理应用程序,我在primefaces中使用schedule components http://primefaces.org:8080/showcase/ui/data/schedule.xhtml
但是我想创建我自己的事件,它有几个属性,不仅仅是3作为DefaultScheduleEvent?
感谢您的帮助。
答案 0 :(得分:0)
您可以创建班级的对象并将其添加到活动
实施例
eventModel = new DefaultScheduleModel();
/***create your object*/
yourclass obj1= new yourclass()
obj1.setattrib1('1');
obj1.setattrib2('2');
obj1.setattrib3('3');
/********/
/****add object to event (last parameter)*////
eventModel.addEvent(new DefaultScheduleEvent("Champions League Match", previousDay8Pm(), previousDay11Pm(),obj1));
选择......
public void onEventSelect(SelectEvent selectEvent) {
event = (ScheduleEvent) selectEvent.getObject();
yourclass ob1=(yourclass) event.getData();
}