[richfaces-issues] [JBoss JIRA] (RF-12978) collapsibleSubTable ignores rowClasses

Jiří Štefek (JIRA) jira-events at lists.jboss.org
Mon Jun 17 05:05:21 EDT 2013


    [ https://issues.jboss.org/browse/RF-12978?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12781996#comment-12781996 ] 

Jiří Štefek commented on RF-12978:
----------------------------------

Well, I don't think that dataTable behaves different in this case. There are theirs standard columns styles for comparison:
{code}
.rf-cst-c {
/* cst=colapsibleSubTable */
    background-color: #FFFFFF;
    border-bottom: 1px solid #C4C0C9;
    border-right: 1px solid #C4C0C9;
    color: #000000;
    font-family: Arial,Verdana,sans-serif;
    font-size: 11px;
    padding: 4px;
}
.rf-dt-c {
/* dt=dataTable */
    color: #000000;
    font-family: Arial,Verdana,sans-serif;
    font-size: 11px;
}
{code}

If we are talking about just the background color, than as you can see the dataTable's style for column don't have background-color, so the background-color will be inherited from row (parent), but other style properties will be overridden by the default skinning of the component (as with the collabsibleSubTable).

*Also notice that dataTable and collapsibleSubTable don't have defined styles for rows, so the defined @rowClasses will always apply.*

More about the dataTable x collapsibleSubTable:
If you try, e.g. in the example I've put here, to set the dataTable's @rowClasses to the same as for the collapsibleSubTable, but enhance the styles (and don't override the rf-dt-c), e.g:
{code}
.oddRow{
    background-color: #B6AD84;
    font-size: xx-large;
}
{code}
You can see, that the font-size will still be 11px (rf-dt-c) and not its much larger version.

Where's the problem?
When you use:
{code}
<h:head>
<h:outputStyleSheet name="css/localCssFile.css"/>
</h:head>

or 

<h:head>
<link to external css style/>
</h:head>
{code}
the rendered page's head will look like this (in example provided here):
{code}
<head>
<link with user style/>
<link with rf skinning/>
<link with packed styles of the RF's components/>
</head>
{code}

So, the RF's styles will override all other styles (for its components) (they are the last, the last css style to apply).

*This can be fixed by putting the user defined styles AFTER the RF's styles in the HEAD [verified]. But who knows what problems can it bring, since it influences all components.* <<< for [Brian Leathem|https://issues.jboss.org/secure/ViewProfile.jspa?name=bleathem]

You should workaround this by placing the <link> (or <h:outputStyleSheet>, the resource will be placed after other styles in the head) in the <h:body>.
                
> collapsibleSubTable ignores rowClasses
> --------------------------------------
>
>                 Key: RF-12978
>                 URL: https://issues.jboss.org/browse/RF-12978
>             Project: RichFaces
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>          Components: component
>    Affects Versions: 4.3.1
>         Environment: Firefox 20.0, Linux
>            Reporter: Edward I
>            Assignee: Jiří Štefek
>         Attachments: rf-12978.zip
>
>
> The rowClasses is ignored in the following:
> {code:xml}
> <rich:collapsibleSubTable value="#{item.items}" var="comp" rowClasses="oddRow, evenRow">
> {code}
> DataTable works correctly with the same rowClasses.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira



More information about the richfaces-issues mailing list