更改primefaces Scheduler事件的颜色 [英] Change the color of primefaces Scheduler Event

查看:111
本文介绍了更改primefaces Scheduler事件的颜色的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用primefaces(3.0)计划程序组件.

I am using primefaces(3.0) scheduler component.

http://www.primefaces.org/showcase-labs/ui/schedule.jsf

我们可以看到这里有一些颜色创建的事件 蓝色.

As we can see here there there are some events created with color blue.

现在,我想根据以下内容更改这些事件的颜色 独特性.作为每个员工的示例,将有一个唯一的ID 相关.

Now I want to change the color of these events, on the basis of uniqueness. As a example for each empolyee there will be a unique ID associated.

对于雇员ID 1,我们可以说,事件ID 2的事件颜色将是蓝色. 事件颜色将是红色,依此类推.

So for lets say for employee ID 1 Events color will be blue, for ID 2 events color will be red and so on.

如何将颜色应用到支持bean的事件数量上? 有任何线索...

how can I apply colors to these number of events from backing bean ? Any clue....

我能够以这种方式更改调度程序的背景颜色,但对如何更改事件的颜色一无所知?

I am able to change the background color for scheduler in this way, but dont have any idea about how to change the color of events ?

推荐答案

如果需要,在同一事件中添加样式类和数据.

if you need, add style class and data in the same event.

示例:

String id="2";
DefaultScheduleEvent evento = new DefaultScheduleEvent("titule", new Date(), new Date(), id);
evento.setStyleClass("event-close");   

在CSS中,达米安的反应很好.

In the CSS, Damian's response is good.

这篇关于更改primefaces Scheduler事件的颜色的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆