You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Jurgen Lust (JIRA)" <de...@myfaces.apache.org> on 2006/01/08 23:35:20 UTC

[jira] Commented: (MYFACES-976) Apply patch to add ScheduleEntry level CSS style and class attributes

    [ http://issues.apache.org/jira/browse/MYFACES-976?page=comments#action_12362132 ] 

Jurgen Lust commented on MYFACES-976:
-------------------------------------

I've implemented a different solution for this problem, see bug 1012.
The problem with the solution provided here is that you put HTML/CSS specific stuff in the model contract for the component, which is not a very nice MVC-way of working.
Bug 1012 introduces the ScheduleEntryRenderer, which is very similar to the ListCellRenderer etc. from Swing. The fourth example of the schedule component demonstrates this by assigning a different color to each entry.

> Apply patch to add ScheduleEntry level CSS style and class attributes
> ---------------------------------------------------------------------
>
>          Key: MYFACES-976
>          URL: http://issues.apache.org/jira/browse/MYFACES-976
>      Project: MyFaces
>         Type: New Feature
>   Components: Sandbox
>     Versions: Nightly
>     Reporter: Peter Mahoney
>  Attachments: schedulepatch.txt
>
> I have found the need to introduce the ability to set the CSS style and class attributes for individual entries. I have done this by adding the methods getStyle and getStyleClass to the ScheduleEntry interface. 
> I use getStyle to change the colour of the text, depending on which scheduler the entry is pulled in from. I use getStyleClass to specify a class representing whether the entry is an appointment or task, completed, due, in progress, etc.
> DefaultScheduleEntry has been changed to implement the above two methods, returning null values. AbstractCompactScheduleRenderer and ScheduleDetailedDayRender have been changed to output the above properties.  

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira