[
http://issues.apache.org/jira/browse/MYFACES-888?page=comments#action_12358908
]
Paul Spencer commented on MYFACES-888:
--------------------------------------
I would like for the entry to be able to set the CSS class, in addition to
having a default CSS class set by the ScheduleTag. As an example, the Schedule
is displaying members of a team, Joe, Sam, and Ann. All of Joe's entries have
a green background, Sam's are green, and Ann's are orange with an bold font.
A Suggested Implementation (A better one may exist)
1) Add to ScheduleEntry
/** Constant for CSS Class used for subtitles */
int CSS_CLASS_SUBTITLE = 100;
/** Constant for CSS Class used for titles */
int CSS_CLASS_TITLE = 101;
.....
/**
* Return the CSS Class to use for a class type.
*
* @param cssClassType Type of CSS Class to get
* @param defaultCssClass CSS Class to use when no entry specific value
exits.
*/
String getCssClass( int cssClassType, String defaultCssClass);
2) Add to DefaultScheduleEntry
/**
* Always return the default type.
* Note: I suggest moving this method to an abstract class,
AbstractEntry, that
* DefaultScheduleEntry would extend.
*/
String getCssClass( int cssClassType, String defaultCssClass)
{
return defaultCssClass;
}
3) Renders, like ScheduleDetailDayRender, would get each entries
getCssClass(...) to get the cssClass.
> Classes for Schedule Entry, Title, and Subtitle should be optional parameters
> to the tag.
> -----------------------------------------------------------------------------------------
>
> Key: MYFACES-888
> URL: http://issues.apache.org/jira/browse/MYFACES-888
> Project: MyFaces
> Type: Improvement
> Components: Sandbox
> Versions: 1.1.1
> Reporter: Paul Spencer
>
> CSS Class for the Schedule Component are hardcoded. I sugget they should be
> optional parameters to the tag.
> Currently
> CSS Class
> ------------------------ ----------------------
> Entire Entry entry
> title field title
> subtitle field subtitle
> I am sure their are may other CSS Classes that are hardcoded that should be
> added to this list.
--
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